дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 03:05:40 +02:00
feat(agents): Select the active session in the Agents list (#140)
Switching between agent session tabs in the editor now moves the Agents tool window's selection to that task, expanding its group (e.g. Archived) when it is collapsed. The list also opens with the active session selected. Tabs of other kinds leave the selection as it is. The editor service gains activeInput() and onActiveInputChange() so features can follow the active tab of any kind.
Цей коміт міститься в:
1 джерело
f8b3ef6840
коміт
44b2d11b2d
4 files changed
+43
-3
No files matched your search
@@ -1093,6 +1093,20 @@ export class EditorController implements SlotHost {
|
||||
this.apply((s) => closeKey(s, key));
|
||||
}
|
||||
|
||||
activeInput(): EditorInput | null {
|
||||
return this.activeTabOf()?.input ?? null;
|
||||
}
|
||||
|
||||
onActiveInputChange(fn: (input: EditorInput | null) => void): () => void {
|
||||
let prev = this.activeInput()?.key;
|
||||
return useTabs.subscribe(() => {
|
||||
const input = this.activeInput();
|
||||
if (input?.key === prev) return;
|
||||
prev = input?.key;
|
||||
fn(input);
|
||||
});
|
||||
}
|
||||
|
||||
activePath(): string | null {
|
||||
return this.activeSlot?.model.path ?? this.activeTabOf()?.input.path ?? null;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ export function activate(): void | (() => void) {
|
||||
focus: () => ctrl.focus(),
|
||||
openPaths: () => ctrl.openPaths(),
|
||||
openTabs: () => ctrl.openTabs(),
|
||||
activeInput: () => ctrl.activeInput(),
|
||||
onActiveInputChange: (fn) => ctrl.onActiveInputChange(fn),
|
||||
closePath: (path) => ctrl.closePath(path),
|
||||
closeInput: (key) => ctrl.closeInput(key),
|
||||
reformat: async (path) => {
|
||||
|
||||
Reference in new issue
Заблокувати користувача