Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find widget search history per editor instance #234208

Closed
wants to merge 131 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
cb4076e
Decorations wip
Tyriar Nov 18, 2024
8354641
Prototype for extracting inline decoration styles
Tyriar Nov 19, 2024
2f88b4b
Find widget search history per editor instance
osortega Nov 19, 2024
a42e4e9
Improve rule pulling, report unsupported rules
Tyriar Nov 19, 2024
f536f76
Apply CSS styles in gpu lines
Tyriar Nov 19, 2024
ee5b891
Apply style to char metadata, not token
Tyriar Nov 19, 2024
adaa9f2
Start of gpu character metadata concept
Tyriar Nov 20, 2024
d3c1d2e
Basic handling of alpha channel, ignore for now
Tyriar Nov 20, 2024
810ee37
Merge remote-tracking branch 'origin/main' into tyriar/gpu_decoration…
Tyriar Nov 20, 2024
37e6cb3
Clean up DecorationCssRulerExtractor DOM nodes
Tyriar Nov 20, 2024
1f90068
Move CSS out and improve lifecycle of DecorationCssRuleExtractor
Tyriar Nov 20, 2024
3489890
Move gpu/ test folder into correct new place
Tyriar Nov 20, 2024
01e1c7c
Add unit tests for DecorationCssRuleExtractor
Tyriar Nov 20, 2024
46abc8b
Don't support lines with pseudo classes
Tyriar Nov 20, 2024
f87274f
Move general parse function to color.ts and add some tests
Tyriar Nov 20, 2024
17cf79e
Rename to editor group
osortega Nov 21, 2024
efd420e
Merge branch 'main' into osortega/find-history-per-editor
osortega Nov 21, 2024
07d84aa
Add CSS named color support to parse function
Tyriar Nov 21, 2024
b5c3a7f
Fix transparent color test
Tyriar Nov 21, 2024
8f65102
Fix issue with caching ignoring charMetadata
Tyriar Nov 22, 2024
9b4c43b
Add tests for toString and toNumber24Bit
Tyriar Nov 22, 2024
d190300
Git - only show git blame for text documents with the `file` scheme f…
lszomoru Nov 21, 2024
78eed5d
add support for file/folder terminal completions (#234289)
meganrogge Nov 21, 2024
5a27ba9
testing: vertically center test message badge
connor4312 Nov 21, 2024
69fd4cf
testing: track test error message decorations correctly
connor4312 Nov 21, 2024
26ff438
chat - tweaks to welcome (#234250)
bpasero Nov 21, 2024
b8a74f1
update distro pointer
isidorn Nov 21, 2024
e313fa9
Merge pull request #234331 from microsoft/isidorn/renewed-shrew
isidorn Nov 21, 2024
d987732
Smoke test failure - changing selectors depending on app quality (#23…
aiday-mar Nov 21, 2024
9a13d63
Persist selected chat model globally, not per-workspace (#234335)
roblourens Nov 21, 2024
515399c
chat - welcome updates (#234329)
bpasero Nov 21, 2024
ec41c73
Git - add git blame hover (status bar item, editor decoration) (#234338)
lszomoru Nov 21, 2024
01adf93
Restore tab newline fix in editor tabs (#234340)
benibenj Nov 21, 2024
b4b34c1
chat - tweaks to welcome (#234343)
bpasero Nov 21, 2024
043762f
edits undo: chat entries are no longer hidden after reload (#234345)
aeschli Nov 21, 2024
8166c56
chat: persist 'isHidden' (#234350)
aeschli Nov 21, 2024
d6e1e9a
chat - move the hide action to the dropdown (#234359)
bpasero Nov 21, 2024
d37cdc8
fix: chat related files polish (#234364)
joyceerhl Nov 21, 2024
4e8160f
Add telemetry for tool calls (#234365)
roblourens Nov 21, 2024
5ab1a6a
chat edits: fix for redo after reload (#234366)
aeschli Nov 21, 2024
b441c40
chat - tweaks to welcome (#234370)
bpasero Nov 21, 2024
65ff330
Notebook snapshot (cells and buffer)
rebornix Nov 21, 2024
46ee2f9
RestoreSnapshot
rebornix Nov 21, 2024
2db8899
fix tests
rebornix Nov 21, 2024
250a175
edits: more simplifications (#234377)
aeschli Nov 21, 2024
201e98f
`handle: string` to `nativeHandle: UInt8Array` based on feedback (#23…
TylerLeonhardt Nov 21, 2024
521c6bc
remote: broaden URI identification on openExternal (#234380)
connor4312 Nov 21, 2024
fb53d6a
fix: serialize/deserialize working set URIs for restored chat request…
joyceerhl Nov 21, 2024
cc236db
feat: allow removing files from working set (#234385)
joyceerhl Nov 21, 2024
c24fb32
chat - make hide action globally accessible (#234383)
bpasero Nov 21, 2024
55d234f
Merge pull request #234381 from microsoft/rebornix/weak-tick
rebornix Nov 21, 2024
8d2fb59
improve folder/file terminal completions (#234363)
meganrogge Nov 21, 2024
2d9cde3
Git - tweak git blame computation (#234386)
lszomoru Nov 21, 2024
9f504fc
Add markdown cell toolbar entry for run in section (#234387)
Yoyokrazy Nov 21, 2024
73a4532
feat: render +/- diff summary in completed code block pill (#234392)
joyceerhl Nov 22, 2024
4fbde8b
Update the handle if the user uses aux windows (#234394)
TylerLeonhardt Nov 22, 2024
f5452ff
Move `env.nativeHandle` to `window.nativeHandle` (#234395)
TylerLeonhardt Nov 22, 2024
019832a
Change working set title and excluded files color (#234406)
benibenj Nov 22, 2024
bb26c9f
update esrp params (#234407)
joaomoreno Nov 22, 2024
3ef70d7
Git Blame - switch to LineRangeMapping and exclusive line ranges (#23…
lszomoru Nov 22, 2024
e0d9b26
Implement allowed extensions feature (#234414)
sandy081 Nov 22, 2024
dff8203
Support drag and drop for symbols in breadcrumbs, outline and chat (#…
benibenj Nov 22, 2024
c337f26
:lipstick: (#234417)
joaomoreno Nov 22, 2024
165cb5f
:lipstick: (#234418)
sandy081 Nov 22, 2024
829d1a6
Removing the text area dom node on disposal (#234419)
aiday-mar Nov 22, 2024
65d6dc6
Git Blame - refactor implementation to use an additional dirty diff p…
lszomoru Nov 22, 2024
22dd305
renderer side inline hint and cmd to show/hide (#234421)
jrieken Nov 22, 2024
538c779
Git - extract staged resource quick diff provider (#234425)
lszomoru Nov 22, 2024
53d4a74
Merge branch 'main' into tyriar/gpu_decorations_wip
Tyriar Nov 22, 2024
36014e4
Speed up and simplify handling of inline decorations
Tyriar Nov 22, 2024
55e3009
Make canRender call non-static
Tyriar Nov 22, 2024
53f4acf
Get style extraction working for decorations with multiple class names
Tyriar Nov 22, 2024
b392c6c
Merge branch 'main' into tyriar/gpu_decorations_wip
Tyriar Nov 22, 2024
f63389a
Merge pull request #234127 from microsoft/tyriar/gpu_decorations_wip
Tyriar Nov 22, 2024
9be6124
update distro (#234438)
sandy081 Nov 22, 2024
7f65c4e
testing: testing.automaticallyOpenResults -> testing.automaticallyOpe…
connor4312 Nov 22, 2024
1e9ac16
Render JSDoc examples as typescript code (#234143)
ribru17 Nov 22, 2024
2700ee9
fix: try decluttering the chat editing widget toolbar (#234448)
joyceerhl Nov 22, 2024
a0f4e95
debug: cleanup welcome view actions (#234446)
connor4312 Nov 22, 2024
3b6e0ac
fix: don't include slash command disambiguation twice
joyceerhl Nov 22, 2024
f3a2f08
fix: disambiguation request should receive participants for that loca…
joyceerhl Nov 22, 2024
c7c53b6
Fix kerberos import (github/copilot#13764)
chrmarti Nov 22, 2024
595e0fa
No need for memento hack (#234450)
TylerLeonhardt Nov 22, 2024
13e5c28
Remove msal-node-extensions workaround (#234456)
TylerLeonhardt Nov 22, 2024
06b5027
fix: update localization for walkthrough page title in GettingStarted…
bhavyaus Nov 22, 2024
dfffb44
Update logging & delete dead code (#234458)
TylerLeonhardt Nov 23, 2024
c3ddd54
fix: add tooltip for chat collapsed code blocks (#234460)
joyceerhl Nov 23, 2024
ead1822
fix terminal suggest dir bug (#234462)
meganrogge Nov 23, 2024
938ff2d
chat - rewrite setup welcome (#234413)
bpasero Nov 23, 2024
481f709
Git Blame - fix editor decoration hover (#234469)
lszomoru Nov 23, 2024
86130d9
Git - add onDidCheckout extension API event (#234483)
lszomoru Nov 24, 2024
f72a0a7
add tests for terminal suggest widget, fix some bugs (#234445)
meganrogge Nov 24, 2024
7e5533a
chat - tweaks to welcome (#234500)
bpasero Nov 25, 2024
453c441
Engineering - switch to variable group (#234537)
lszomoru Nov 25, 2024
1f4ce20
fix(chat): ensure entitlement is resolved only once and return entitl…
bpasero Nov 25, 2024
b6a557c
Clear excluded files from working set (#234542)
benibenj Nov 25, 2024
c708e58
tweak inline chat hint (#234544)
jrieken Nov 25, 2024
c5a2158
use extensionVersion instead of version for reporting (#234545)
sandy081 Nov 25, 2024
bb01685
Fix drag-and-drop text and resource data for symbols (#234548)
benibenj Nov 25, 2024
8be4a14
Fix folder drag and drop on macOS (#234550)
benibenj Nov 25, 2024
1ff9676
add missing tooltip (#234551)
jrieken Nov 25, 2024
c4d6929
chat - tweaks to welcome (#234556)
bpasero Nov 25, 2024
66b424c
Fix kerberos import (github/copilot#13764)
chrmarti Nov 25, 2024
6eaf359
Engineering - update variable group name (#234561)
lszomoru Nov 25, 2024
69d0a63
chat - tweaks to welcome (#234560)
bpasero Nov 25, 2024
15a6c45
Support dragging untitled editors into chat (#234562)
benibenj Nov 25, 2024
1d2ddba
change navigation depends on currently navigated to value, not select…
jrieken Nov 25, 2024
2f0eedb
fix #234547 (#234554)
sandy081 Nov 25, 2024
c3fda14
Only support regular inline decorations on GPU for now
Tyriar Nov 25, 2024
417395e
Support object type policy (#234428)
sandy081 Nov 25, 2024
fbffc92
Refactor update methods in ChatSetupContextKeys to return promises fo…
bpasero Nov 25, 2024
d783eb4
Remove condition for editing participant registration in chat command…
bpasero Nov 25, 2024
ba0ecde
Merge pull request #234579 from microsoft/tyriar/234570
Tyriar Nov 25, 2024
92a6338
polish allowed extensions feature (#234585)
sandy081 Nov 25, 2024
1659f74
SCM - update input action bar cancel icon (#234584)
lszomoru Nov 25, 2024
00dc7aa
Git - fix git blame hover action titles (#234583)
lszomoru Nov 25, 2024
0f104c8
Add activity service integration for chat setup progress indication (…
bpasero Nov 25, 2024
afe1901
Git - add template support for editor decoration/status bar item (#23…
lszomoru Nov 25, 2024
19c22d4
make test spec array, use it to run tests (#234593)
meganrogge Nov 25, 2024
35cd0d0
hide squiggles when showing inline chat hint for a line (#234599)
jrieken Nov 25, 2024
9fa0df9
Render lines to the alphabetic baseline
Tyriar Nov 25, 2024
eab8277
Remove alphabeticBaseline and add docs
Tyriar Nov 25, 2024
ffc6ea3
Git - refactor blame cache in preparation to more changes (#234604)
lszomoru Nov 25, 2024
9fdeb72
Merge pull request #234601 from microsoft/tyriar/234581
Tyriar Nov 25, 2024
15ccf58
Update chat setup actions to include experimental configuration preco…
bpasero Nov 25, 2024
4e5bced
Don't clobber other view events with final one
Tyriar Nov 25, 2024
a5200f0
Merge pull request #234613 from microsoft/tyriar/234474
Tyriar Nov 25, 2024
45d8cdb
Handle line mapping changed and don't update buffers after decoration…
Tyriar Nov 25, 2024
30d70f2
Merge branch 'main' into tyriar/234474__234614
Tyriar Nov 25, 2024
ca57f64
Merge pull request #234618 from microsoft/tyriar/234474__234614
Tyriar Nov 25, 2024
90d883f
Allow importing multiple files from the search widget into copilot chat
osortega Nov 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/vs/editor/common/config/editorOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ export interface IEditorFindOptions {
/**
* Controls how the find widget search history should be stored
*/
findSearchHistory?: 'never' | 'workspace';
findSearchHistory?: 'never' | 'workspace' | 'editor';
}

/**
Expand Down Expand Up @@ -1726,11 +1726,12 @@ class EditorFind extends BaseEditorOption<EditorOption.find, IEditorFindOptions,
},
'editor.find.findSearchHistory': {
type: 'string',
enum: ['never', 'workspace'],
enum: ['never', 'workspace', 'editor'],
default: defaults.findSearchHistory,
enumDescriptions: [
nls.localize('editor.find.findSearchHistory.never', 'Do not store search history from the find widget.'),
nls.localize('editor.find.findSearchHistory.workspace', 'Store search history across the active workspace'),
nls.localize('editor.find.findSearchHistory.editor', 'Store the search history per editor instance'),
],
description: nls.localize('find.findSearchHistory', "Controls how the find widget search history should be stored")
}
Expand All @@ -1754,7 +1755,7 @@ class EditorFind extends BaseEditorOption<EditorOption.find, IEditorFindOptions,
globalFindClipboard: boolean(input.globalFindClipboard, this.defaultValue.globalFindClipboard),
addExtraSpaceOnTop: boolean(input.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop),
loop: boolean(input.loop, this.defaultValue.loop),
findSearchHistory: stringSet<'never' | 'workspace'>(input.findSearchHistory, this.defaultValue.findSearchHistory, ['never', 'workspace']),
findSearchHistory: stringSet<'never' | 'workspace' | 'editor'>(input.findSearchHistory, this.defaultValue.findSearchHistory, ['never', 'workspace', 'editor']),
};
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/vs/editor/contrib/find/browser/findWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
this._contextKeyService = contextKeyService;
this._storageService = storageService;
this._notificationService = notificationService;
this._findWidgetSearchHistory = new FindWidgetSearchHistory(this._storageService);
const findSearchHistoryConfig = this._codeEditor.getOption(EditorOption.find).findSearchHistory;
this._findWidgetSearchHistory = new FindWidgetSearchHistory(
this._storageService,
findSearchHistoryConfig === 'editor' ? this._codeEditor : undefined
);

this._ctrlEnterReplaceAllWarningPrompted = !!storageService.getBoolean(ctrlEnterReplaceAllWarningPromptedKey, StorageScope.PROFILE);

Expand Down Expand Up @@ -970,7 +974,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
showHistoryHint: () => showHistoryKeybindingHint(this._keybindingService),
inputBoxStyles: defaultInputBoxStyles,
toggleStyles: defaultToggleStyles,
history: findSearchHistoryConfig === 'workspace' ? this._findWidgetSearchHistory : new Set([]),
history: findSearchHistoryConfig === 'never' ? new Set([]) : this._findWidgetSearchHistory,
}, this._contextKeyService));
this._findInput.setRegex(!!this._state.isRegex);
this._findInput.setCaseSensitive(!!this._state.matchCase);
Expand Down
18 changes: 15 additions & 3 deletions src/vs/editor/contrib/find/browser/findWidgetSearchHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,27 @@

import { IHistory } from '../../../../base/common/history.js';
import { IStorageService, StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js';
import { ICodeEditor } from '../../../browser/editorBrowser.js';

export class FindWidgetSearchHistory implements IHistory<string> {
public static readonly FIND_HISTORY_KEY = 'workbench.find.history';
private static readonly FIND_HISTORY_KEY = 'workbench.find.history';
private readonly id: string;
private inMemoryValues: Set<string> = new Set();

constructor(
@IStorageService private readonly storageService: IStorageService,
codeEditor?: ICodeEditor,
) {
this.load();
if (codeEditor) {
this.id = `${FindWidgetSearchHistory.FIND_HISTORY_KEY}.${codeEditor.getId()}`;
// The editor id could be re-used, so we need to clean the storage when it gets disposed
codeEditor.onDidDispose(() => {
this.clear();
});
} else {
this.id = FindWidgetSearchHistory.FIND_HISTORY_KEY;
}
}

delete(t: string): boolean {
Expand Down Expand Up @@ -50,7 +62,7 @@ export class FindWidgetSearchHistory implements IHistory<string> {
load() {
let result: [] | undefined;
const raw = this.storageService.get(
FindWidgetSearchHistory.FIND_HISTORY_KEY,
this.id,
StorageScope.WORKSPACE
);

Expand All @@ -71,7 +83,7 @@ export class FindWidgetSearchHistory implements IHistory<string> {
this.inMemoryValues.forEach(e => elements.push(e));
return new Promise<void>(resolve => {
this.storageService.store(
FindWidgetSearchHistory.FIND_HISTORY_KEY,
this.id,
JSON.stringify(elements),
StorageScope.WORKSPACE,
StorageTarget.USER,
Expand Down
2 changes: 1 addition & 1 deletion src/vs/monaco.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4064,7 +4064,7 @@ declare namespace monaco.editor {
/**
* Controls how the find widget search history should be stored
*/
findSearchHistory?: 'never' | 'workspace';
findSearchHistory?: 'never' | 'workspace' | 'editor';
}

export type GoToLocationValues = 'peek' | 'gotoAndPeek' | 'goto';
Expand Down
Loading