mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 23:35:54 +01:00
sessions - adopt modal editor support from core (#296585)
* sessions - adopt modal editor support from core * Update src/vs/workbench/services/editor/test/browser/modalEditorGroup.test.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/skills/agent-sessions-layout/SKILL.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/vs/workbench/services/editor/common/editorGroupFinder.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
1
.github/copilot-instructions.md
vendored
1
.github/copilot-instructions.md
vendored
@@ -140,6 +140,7 @@ function f(x: number, y: string): void { }
|
||||
- Do not duplicate code. Always look for existing utility functions, helpers, or patterns in the codebase before implementing new functionality. Reuse and extend existing code whenever possible.
|
||||
- You MUST deal with disposables by registering them immediately after creation for later disposal. Use helpers such as `DisposableStore`, `MutableDisposable` or `DisposableMap`. Do NOT register a disposable to the containing class if the object is created within a method that is called repeadedly to avoid leaks. Instead, return a `IDisposable` from such method and let the caller register it.
|
||||
- You MUST NOT use storage keys of another component only to make changes to that component. You MUST come up with proper API to change another component.
|
||||
- Use `IEditorService` to open editors instead of `IEditorGroupsService.activeGroup.openEditor` to ensure that the editor opening logic is properly followed and to avoid bypassing important features such as `revealIfOpened` or `preserveFocus`.
|
||||
|
||||
## Learnings
|
||||
- Minimize the amount of assertions in tests. Prefer one snapshot-style `assert.deepStrictEqual` over multiple precise assertions, as they are much more difficult to understand and to update.
|
||||
|
||||
Reference in New Issue
Block a user