@rtc-agent/component 0.2.7-rc.4 → 0.2.8-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +109 -13
- package/dist/.generated/locales/en-US.d.ts +55 -7
- package/dist/.generated/locales/en-US.d.ts.map +1 -1
- package/dist/assets/{shared-worker-BQv441O7.js → shared-worker-CXyjL7E6.js} +210 -210
- package/dist/components/activity-bar/rtc-activity-bar.d.ts +23 -21
- package/dist/components/activity-bar/rtc-activity-bar.d.ts.map +1 -1
- package/dist/components/activity-bar/rtc-activity-bar.styles.d.ts +2 -2
- package/dist/components/chat-layout/rtc-chat-layout.d.ts +87 -80
- package/dist/components/chat-layout/rtc-chat-layout.d.ts.map +1 -1
- package/dist/components/chat-layout/rtc-chat-layout.styles.d.ts +5 -5
- package/dist/components/content-area/rtc-error-message.d.ts +1 -1
- package/dist/components/content-area/rtc-message-more-menu.d.ts +4 -4
- package/dist/components/content-area/rtc-message-more-menu.d.ts.map +1 -1
- package/dist/components/content-area/rtc-message.d.ts +82 -76
- package/dist/components/content-area/rtc-message.d.ts.map +1 -1
- package/dist/components/content-area/rtc-message.styles.d.ts.map +1 -1
- package/dist/components/content-area/rtc-toolcall-card.d.ts +10 -5
- package/dist/components/content-area/rtc-toolcall-card.d.ts.map +1 -1
- package/dist/components/content-area/rtc-toolcall-card.styles.d.ts.map +1 -1
- package/dist/components/content-area/rtc-toolcall-reply.d.ts +12 -0
- package/dist/components/content-area/rtc-toolcall-reply.d.ts.map +1 -1
- package/dist/components/content-area/rtc-toolcall-reply.styles.d.ts.map +1 -1
- package/dist/components/content-area/rtc-user-message.d.ts +10 -10
- package/dist/components/drawer/rtc-drawer.d.ts +29 -27
- package/dist/components/drawer/rtc-drawer.d.ts.map +1 -1
- package/dist/components/drawer/rtc-drawer.styles.d.ts +9 -9
- package/dist/components/editor-area/rtc-editor-area.d.ts +29 -29
- package/dist/components/editor-area/rtc-editor-area.d.ts.map +1 -1
- package/dist/components/editor-area/rtc-editor-area.styles.d.ts +3 -3
- package/dist/components/editor-area/rtc-editor-tab.d.ts +27 -27
- package/dist/components/editor-area/rtc-editor-tab.d.ts.map +1 -1
- package/dist/components/editor-area/rtc-editor-tab.styles.d.ts +3 -3
- package/dist/components/editor-area/rtc-editor-toolbar.d.ts +19 -19
- package/dist/components/editor-area/rtc-editor-toolbar.d.ts.map +1 -1
- package/dist/components/editor-area/rtc-editor-toolbar.styles.d.ts +3 -3
- package/dist/components/file-explorer/rtc-file-explorer.d.ts +28 -28
- package/dist/components/file-explorer/rtc-file-explorer.d.ts.map +1 -1
- package/dist/components/file-explorer/rtc-file-explorer.styles.d.ts +3 -3
- package/dist/components/file-explorer/rtc-file-tree-item.d.ts +19 -19
- package/dist/components/file-explorer/rtc-file-tree-item.d.ts.map +1 -1
- package/dist/components/file-explorer/rtc-file-tree-item.styles.d.ts +3 -3
- package/dist/components/function-console/rtc-function-console.d.ts +32 -0
- package/dist/components/function-console/rtc-function-console.d.ts.map +1 -0
- package/dist/components/function-console/rtc-function-console.styles.d.ts +8 -0
- package/dist/components/function-console/rtc-function-console.styles.d.ts.map +1 -0
- package/dist/components/function-debugger/rtc-function-debugger.d.ts +39 -0
- package/dist/components/function-debugger/rtc-function-debugger.d.ts.map +1 -0
- package/dist/components/function-debugger/rtc-function-debugger.styles.d.ts +8 -0
- package/dist/components/function-debugger/rtc-function-debugger.styles.d.ts.map +1 -0
- package/dist/components/function-history/rtc-function-history.d.ts +49 -0
- package/dist/components/function-history/rtc-function-history.d.ts.map +1 -0
- package/dist/components/function-history/rtc-function-history.styles.d.ts +8 -0
- package/dist/components/function-history/rtc-function-history.styles.d.ts.map +1 -0
- package/dist/components/function-params/rtc-function-params.d.ts +29 -0
- package/dist/components/function-params/rtc-function-params.d.ts.map +1 -0
- package/dist/components/function-params/rtc-function-params.styles.d.ts +8 -0
- package/dist/components/function-params/rtc-function-params.styles.d.ts.map +1 -0
- package/dist/components/function-tree/rtc-function-tree.d.ts +59 -0
- package/dist/components/function-tree/rtc-function-tree.d.ts.map +1 -0
- package/dist/components/function-tree/rtc-function-tree.styles.d.ts +2 -0
- package/dist/components/function-tree/rtc-function-tree.styles.d.ts.map +1 -0
- package/dist/components/functions-layout/rtc-functions-layout.d.ts +45 -0
- package/dist/components/functions-layout/rtc-functions-layout.d.ts.map +1 -0
- package/dist/components/functions-layout/rtc-functions-layout.styles.d.ts +8 -0
- package/dist/components/functions-layout/rtc-functions-layout.styles.d.ts.map +1 -0
- package/dist/components/input-area/rtc-input-area.d.ts +15 -15
- package/dist/components/input-area/rtc-input-area.d.ts.map +1 -1
- package/dist/components/login/rtc-login-page.d.ts +8 -8
- package/dist/components/markdown-editor/rtc-markdown-editor.d.ts +23 -19
- package/dist/components/markdown-editor/rtc-markdown-editor.d.ts.map +1 -1
- package/dist/components/overlay/rtc-command-panel.d.ts.map +1 -1
- package/dist/components/overlay/rtc-export-dialog.d.ts +59 -0
- package/dist/components/overlay/rtc-export-dialog.d.ts.map +1 -0
- package/dist/components/overlay/rtc-export-dialog.styles.d.ts +11 -0
- package/dist/components/overlay/rtc-export-dialog.styles.d.ts.map +1 -0
- package/dist/components/overlay/rtc-scenario-panel.d.ts +1 -1
- package/dist/components/overlay/rtc-scenario-panel.d.ts.map +1 -1
- package/dist/components/overlay/rtc-session-panel.d.ts +1 -1
- package/dist/components/overlay/rtc-session-panel.d.ts.map +1 -1
- package/dist/components/overlay/rtc-toast.d.ts +8 -8
- package/dist/components/rtc-agent/helpers/bus-handler.d.ts +32 -1
- package/dist/components/rtc-agent/helpers/bus-handler.d.ts.map +1 -1
- package/dist/components/rtc-agent/helpers/command-handler.d.ts +8 -0
- package/dist/components/rtc-agent/helpers/command-handler.d.ts.map +1 -1
- package/dist/components/rtc-agent/helpers/connection-setup.d.ts +5 -8
- package/dist/components/rtc-agent/helpers/connection-setup.d.ts.map +1 -1
- package/dist/components/rtc-agent/helpers/dialog-helpers.d.ts +12 -0
- package/dist/components/rtc-agent/helpers/dialog-helpers.d.ts.map +1 -1
- package/dist/components/rtc-agent/helpers/session-loader.d.ts +2 -0
- package/dist/components/rtc-agent/helpers/session-loader.d.ts.map +1 -1
- package/dist/components/rtc-agent/helpers/vfs-operations.d.ts +22 -3
- package/dist/components/rtc-agent/helpers/vfs-operations.d.ts.map +1 -1
- package/dist/components/rtc-agent/rtc-agent.d.ts +22 -47
- package/dist/components/rtc-agent/rtc-agent.d.ts.map +1 -1
- package/dist/components/session-tree/rtc-session-tab-bar.d.ts +8 -8
- package/dist/components/session-tree/rtc-session-tab-bar.d.ts.map +1 -1
- package/dist/components/session-tree/rtc-session-tab-bar.styles.d.ts +5 -5
- package/dist/components/session-tree/rtc-session-tab.d.ts +6 -6
- package/dist/components/session-tree/rtc-session-tab.d.ts.map +1 -1
- package/dist/components/session-tree/rtc-session-tab.styles.d.ts +6 -6
- package/dist/components/session-tree/rtc-session-tree-item.d.ts +10 -10
- package/dist/components/session-tree/rtc-session-tree-item.d.ts.map +1 -1
- package/dist/components/session-tree/rtc-session-tree-item.styles.d.ts +6 -6
- package/dist/components/session-tree/rtc-session-tree.d.ts +15 -15
- package/dist/components/session-tree/rtc-session-tree.d.ts.map +1 -1
- package/dist/components/session-tree/rtc-session-tree.styles.d.ts +5 -5
- package/dist/components/settings-layout/rtc-settings-layout.d.ts +23 -23
- package/dist/components/settings-layout/rtc-settings-layout.d.ts.map +1 -1
- package/dist/components/settings-layout/rtc-settings-layout.styles.d.ts +3 -3
- package/dist/components/settings-layout/rtc-settings-nav.d.ts +17 -17
- package/dist/components/settings-layout/rtc-settings-nav.d.ts.map +1 -1
- package/dist/components/settings-layout/rtc-settings-nav.styles.d.ts +2 -2
- package/dist/components/status-bar/rtc-status-bar.d.ts +10 -10
- package/dist/components/status-bar/rtc-status-bar.d.ts.map +1 -1
- package/dist/components/status-bar/rtc-status-bar.styles.d.ts +5 -5
- package/dist/components/title-bar/rtc-title-bar.d.ts +4 -4
- package/dist/components/title-bar/rtc-title-bar.d.ts.map +1 -1
- package/dist/components/token-usage/rtc-token-usage.d.ts +21 -21
- package/dist/components/token-usage/rtc-token-usage.d.ts.map +1 -1
- package/dist/config/auth.d.ts +12 -6
- package/dist/config/auth.d.ts.map +1 -1
- package/dist/contexts/activity.d.ts +13 -13
- package/dist/contexts/activity.d.ts.map +1 -1
- package/dist/contexts/auth.d.ts +5 -4
- package/dist/contexts/auth.d.ts.map +1 -1
- package/dist/contexts/editor.d.ts +13 -13
- package/dist/contexts/editor.d.ts.map +1 -1
- package/dist/contexts/file-explorer.d.ts +15 -15
- package/dist/contexts/file-explorer.d.ts.map +1 -1
- package/dist/contexts/function-debug.d.ts +52 -0
- package/dist/contexts/function-debug.d.ts.map +1 -0
- package/dist/contexts/functions.d.ts +43 -0
- package/dist/contexts/functions.d.ts.map +1 -0
- package/dist/contexts/message.d.ts +3 -3
- package/dist/contexts/notification.d.ts +4 -4
- package/dist/contexts/notification.d.ts.map +1 -1
- package/dist/contexts/settings.d.ts +2 -2
- package/dist/contexts/skill.d.ts +5 -5
- package/dist/contexts/skill.d.ts.map +1 -1
- package/dist/contexts/turn-count.d.ts +7 -7
- package/dist/controllers/activity.controller.d.ts +11 -11
- package/dist/controllers/activity.controller.d.ts.map +1 -1
- package/dist/controllers/auth.controller.d.ts +5 -0
- package/dist/controllers/auth.controller.d.ts.map +1 -1
- package/dist/controllers/editor-area.controller.d.ts +42 -41
- package/dist/controllers/editor-area.controller.d.ts.map +1 -1
- package/dist/controllers/editor.controller.d.ts +3 -3
- package/dist/controllers/event-binding.controller.d.ts +204 -0
- package/dist/controllers/event-binding.controller.d.ts.map +1 -0
- package/dist/controllers/file-explorer.controller.d.ts +6 -6
- package/dist/controllers/function-debug.controller.d.ts +67 -0
- package/dist/controllers/function-debug.controller.d.ts.map +1 -0
- package/dist/controllers/functions.controller.d.ts +31 -0
- package/dist/controllers/functions.controller.d.ts.map +1 -0
- package/dist/controllers/message.controller.d.ts +11 -1
- package/dist/controllers/message.controller.d.ts.map +1 -1
- package/dist/controllers/notification.controller.d.ts +34 -30
- package/dist/controllers/notification.controller.d.ts.map +1 -1
- package/dist/controllers/persistence.controller.d.ts +31 -14
- package/dist/controllers/persistence.controller.d.ts.map +1 -1
- package/dist/controllers/session-tab.controller.d.ts +32 -29
- package/dist/controllers/session-tab.controller.d.ts.map +1 -1
- package/dist/controllers/session-tree.controller.d.ts +10 -10
- package/dist/controllers/session-tree.controller.d.ts.map +1 -1
- package/dist/controllers/session.controller.d.ts +6 -6
- package/dist/controllers/settings.controller.d.ts +1 -1
- package/dist/controllers/skill.controller.d.ts +21 -21
- package/dist/controllers/skill.controller.d.ts.map +1 -1
- package/dist/controllers/status-bar.controller.d.ts +11 -11
- package/dist/controllers/toast.controller.d.ts.map +1 -1
- package/dist/controllers/tool-call.controller.d.ts +4 -4
- package/dist/controllers/window-interaction.controller.d.ts +14 -12
- package/dist/controllers/window-interaction.controller.d.ts.map +1 -1
- package/dist/controllers/window-state.controller.d.ts +5 -5
- package/dist/controllers/window-state.controller.d.ts.map +1 -1
- package/dist/core/builtin-system-group.d.ts +26 -19
- package/dist/core/builtin-system-group.d.ts.map +1 -1
- package/dist/core/event-bus.d.ts +31 -31
- package/dist/core/function-registry.d.ts +82 -71
- package/dist/core/function-registry.d.ts.map +1 -1
- package/dist/core/i18n.d.ts +2 -2
- package/dist/core/locale-controller.d.ts +2 -2
- package/dist/core/markdown-generator.d.ts +20 -10
- package/dist/core/markdown-generator.d.ts.map +1 -1
- package/dist/core/ready.d.ts +9 -9
- package/dist/core/scenario-loader.d.ts +29 -25
- package/dist/core/scenario-loader.d.ts.map +1 -1
- package/dist/elements.d.ts +6 -6
- package/dist/{en-US-BK61Z8gy.js → en-US-DGPo7Pzk.js} +56 -8
- package/dist/factory.d.ts.map +1 -1
- package/dist/{highlight-languages-8EK0uwTA.js → highlight-languages-BStkA3vP.js} +1 -1
- package/dist/icons/logo.d.ts +5 -5
- package/dist/{index-Bd4j91y1.js → index-c20k11wZ.js} +28078 -23840
- package/dist/index.d.ts +17 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -36
- package/dist/index.umd.js +3277 -1094
- package/dist/master-lock.d.ts +27 -27
- package/dist/master-lock.d.ts.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types/activity-bar-config.d.ts +14 -14
- package/dist/types/activity-bar-config.d.ts.map +1 -1
- package/dist/types/agent-config.d.ts +18 -18
- package/dist/types/agent-config.d.ts.map +1 -1
- package/dist/types/events.d.ts +75 -19
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/factory.d.ts +13 -5
- package/dist/types/factory.d.ts.map +1 -1
- package/dist/types/functions-debug.d.ts +48 -0
- package/dist/types/functions-debug.d.ts.map +1 -0
- package/dist/types/index.d.ts +97 -102
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/skill.d.ts +95 -83
- package/dist/types/skill.d.ts.map +1 -1
- package/dist/types/window-config.d.ts +37 -37
- package/dist/types/window-config.d.ts.map +1 -1
- package/dist/utils/clipboard.d.ts +6 -6
- package/dist/utils/command-parser.d.ts +9 -9
- package/dist/utils/command-parser.d.ts.map +1 -1
- package/dist/utils/highlight-languages.d.ts +3 -3
- package/dist/utils/relative-time.d.ts +7 -7
- package/dist/utils/session-exporter.d.ts +65 -0
- package/dist/utils/session-exporter.d.ts.map +1 -0
- package/dist/utils/skeleton-tracker.d.ts +56 -56
- package/dist/utils/skeleton-tracker.d.ts.map +1 -1
- package/dist/utils/visibility-manager.d.ts +42 -42
- package/dist/utils/visibility-manager.d.ts.map +1 -1
- package/dist/validation/index.d.ts +16 -16
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/openapi-to-zod.d.ts +5 -5
- package/dist/validation/zod-to-openapi.d.ts +24 -14
- package/dist/validation/zod-to-openapi.d.ts.map +1 -1
- package/dist/worker-bridge.d.ts +11 -0
- package/dist/worker-bridge.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import type { FileNode } from '../types/index.js';
|
|
2
2
|
/**
|
|
3
|
-
* File Explorer Context —
|
|
3
|
+
* File Explorer Context — File tree state management.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* Manages file browser state in a VS Code-style layout: expand/collapse, selection, loading state.
|
|
6
6
|
*
|
|
7
7
|
* Provided by: <rtc-agent> (root)
|
|
8
8
|
* Consumed by: <rtc-file-tree-item>, <rtc-file-explorer>
|
|
9
9
|
*/
|
|
10
10
|
export interface FileExplorerState {
|
|
11
|
-
/**
|
|
11
|
+
/** File tree root node */
|
|
12
12
|
root: FileNode | null;
|
|
13
|
-
/**
|
|
13
|
+
/** Currently selected path */
|
|
14
14
|
selectedPath: string | null;
|
|
15
15
|
}
|
|
16
16
|
export interface FileExplorerActions {
|
|
17
|
-
/**
|
|
17
|
+
/** Set the root node (called after loading from VFS) */
|
|
18
18
|
setRoot(root: FileNode): void;
|
|
19
|
-
/** Toggle
|
|
19
|
+
/** Toggle node expand/collapse */
|
|
20
20
|
toggleNode(path: string): void;
|
|
21
|
-
/**
|
|
21
|
+
/** Expand all nodes */
|
|
22
22
|
expandAll(): void;
|
|
23
|
-
/**
|
|
23
|
+
/** Collapse all nodes */
|
|
24
24
|
collapseAll(): void;
|
|
25
|
-
/**
|
|
25
|
+
/** Select a node */
|
|
26
26
|
selectNode(path: string): void;
|
|
27
|
-
/**
|
|
27
|
+
/** Set node loading state */
|
|
28
28
|
setLoading(path: string, loading: boolean): void;
|
|
29
|
-
/**
|
|
29
|
+
/** Update node children (called after lazy loading) */
|
|
30
30
|
updateChildren(path: string, children: FileNode[]): void;
|
|
31
|
-
/**
|
|
31
|
+
/** Reset state */
|
|
32
32
|
reset(): void;
|
|
33
33
|
}
|
|
34
34
|
export interface FileExplorerContextValue {
|
|
35
35
|
state: FileExplorerState;
|
|
36
36
|
actions: FileExplorerActions;
|
|
37
|
-
/**
|
|
37
|
+
/** Query whether a node is expanded */
|
|
38
38
|
isExpanded(path: string): boolean;
|
|
39
|
-
/**
|
|
39
|
+
/** Query whether a node is loading */
|
|
40
40
|
isLoading(path: string): boolean;
|
|
41
|
-
/**
|
|
41
|
+
/** Query whether a node is selected */
|
|
42
42
|
isSelected(path: string): boolean;
|
|
43
43
|
}
|
|
44
44
|
export declare const FileExplorerContext: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-explorer.d.ts","sourceRoot":"","sources":["../../src/contexts/file-explorer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAC9B,
|
|
1
|
+
{"version":3,"file":"file-explorer.d.ts","sourceRoot":"","sources":["../../src/contexts/file-explorer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAC9B,0BAA0B;IAC1B,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,8BAA8B;IAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAChC,wDAAwD;IACxD,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9B,kCAAkC;IAClC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,uBAAuB;IACvB,SAAS,IAAI,IAAI,CAAC;IAClB,yBAAyB;IACzB,WAAW,IAAI,IAAI,CAAC;IACpB,oBAAoB;IACpB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,6BAA6B;IAC7B,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACjD,uDAAuD;IACvD,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACzD,kBAAkB;IAClB,KAAK,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,uCAAuC;IACvC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,sCAAsC;IACtC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,uCAAuC;IACvC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,mBAAmB;;CAE/B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,iBAGzC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function Debug Context
|
|
3
|
+
*
|
|
4
|
+
* Provides function debugger state and actions to child components.
|
|
5
|
+
*
|
|
6
|
+
* Consumed by: <rtc-function-tree>, <rtc-function-debugger>, <rtc-function-params>,
|
|
7
|
+
* <rtc-function-console>, <rtc-function-history>
|
|
8
|
+
* Provided by: <rtc-agent> (root)
|
|
9
|
+
*/
|
|
10
|
+
import type { FunctionDef } from '../types/skill.js';
|
|
11
|
+
import type { FunctionDebugState, DebugHistoryItem } from '../types/functions-debug.js';
|
|
12
|
+
/**
|
|
13
|
+
* Function debug context actions
|
|
14
|
+
*/
|
|
15
|
+
export interface FunctionDebugActions {
|
|
16
|
+
/** Select a function for debugging */
|
|
17
|
+
selectFunction: (fn: FunctionDef) => void;
|
|
18
|
+
/** Update the current parameter JSON string */
|
|
19
|
+
updateParams: (params: string) => void;
|
|
20
|
+
/** Execute the currently selected function */
|
|
21
|
+
execute: () => Promise<void>;
|
|
22
|
+
/** Execute from a history item (restores params and re-runs) */
|
|
23
|
+
executeFromHistory: (item: DebugHistoryItem) => Promise<void>;
|
|
24
|
+
/** Restore a history item's params and logs to the current view (without executing) */
|
|
25
|
+
loadFromHistory: (item: DebugHistoryItem) => void;
|
|
26
|
+
/** Clear console logs */
|
|
27
|
+
clearLogs: () => void;
|
|
28
|
+
/** Clear all history */
|
|
29
|
+
clearHistory: () => void;
|
|
30
|
+
/** Load a specific page of history */
|
|
31
|
+
loadHistoryPage: (page: number) => Promise<void>;
|
|
32
|
+
/** Set history filter by function name */
|
|
33
|
+
setHistoryFilter: (functionName?: string) => Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Function debug context value
|
|
37
|
+
*/
|
|
38
|
+
export interface FunctionDebugContextValue {
|
|
39
|
+
state: FunctionDebugState;
|
|
40
|
+
actions: FunctionDebugActions;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Default state
|
|
44
|
+
*/
|
|
45
|
+
export declare const DEFAULT_FUNCTION_DEBUG_STATE: FunctionDebugState;
|
|
46
|
+
/**
|
|
47
|
+
* Function debug context key
|
|
48
|
+
*/
|
|
49
|
+
export declare const FunctionDebugContext: {
|
|
50
|
+
__context__: FunctionDebugContextValue;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=function-debug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-debug.d.ts","sourceRoot":"","sources":["../../src/contexts/function-debug.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAC,kBAAkB,EAAE,gBAAgB,EAAC,MAAM,6BAA6B,CAAC;AAEtF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,sCAAsC;IACtC,cAAc,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC;IAC1C,+CAA+C;IAC/C,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,8CAA8C;IAC9C,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,gEAAgE;IAChE,kBAAkB,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,uFAAuF;IACvF,eAAe,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD,yBAAyB;IACzB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,wBAAwB;IACxB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,sCAAsC;IACtC,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,0CAA0C;IAC1C,gBAAgB,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,OAAO,EAAE,oBAAoB,CAAC;CACjC;AAED;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,kBAY1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;CAA6E,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Functions Context
|
|
3
|
+
*
|
|
4
|
+
* Provides the function registry state to child components.
|
|
5
|
+
*
|
|
6
|
+
* Consumed by: <rtc-function-tree>, <rtc-functions-layout>
|
|
7
|
+
* Provided by: <rtc-agent> (root)
|
|
8
|
+
*/
|
|
9
|
+
import type { FunctionDef, FunctionGroupDef } from '../types/skill.js';
|
|
10
|
+
/**
|
|
11
|
+
* Functions context state
|
|
12
|
+
*/
|
|
13
|
+
export interface FunctionsState {
|
|
14
|
+
/** All registered function definitions */
|
|
15
|
+
functions: FunctionDef[];
|
|
16
|
+
/** All registered group definitions */
|
|
17
|
+
groups: FunctionGroupDef[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Functions context actions
|
|
21
|
+
*/
|
|
22
|
+
export interface FunctionsActions {
|
|
23
|
+
/** Refresh the function list from the registry */
|
|
24
|
+
refresh: () => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Functions context value
|
|
28
|
+
*/
|
|
29
|
+
export interface FunctionsContextValue {
|
|
30
|
+
state: FunctionsState;
|
|
31
|
+
actions: FunctionsActions;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Default state
|
|
35
|
+
*/
|
|
36
|
+
export declare const DEFAULT_FUNCTIONS_STATE: FunctionsState;
|
|
37
|
+
/**
|
|
38
|
+
* Functions context key
|
|
39
|
+
*/
|
|
40
|
+
export declare const FunctionsContext: {
|
|
41
|
+
__context__: FunctionsContextValue;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/contexts/functions.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAC,WAAW,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,0CAA0C;IAC1C,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB,uCAAuC;IACvC,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,kDAAkD;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,gBAAgB,CAAC;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,cAGrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;CAAoE,CAAC"}
|
|
@@ -9,10 +9,10 @@ export interface MessageContextValue {
|
|
|
9
9
|
state: MessageState;
|
|
10
10
|
actions: MessageActions;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Query the current session's user message history (for input box up/down arrow navigation)
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* Returns an array of plain text content, sorted by time in descending order (newest first).
|
|
15
|
+
* Optional method, injected by MessageController.
|
|
16
16
|
*/
|
|
17
17
|
getUserMessageHistory?(sessionId: string, limit?: number): Promise<string[]>;
|
|
18
18
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export interface NotificationState {
|
|
2
|
-
/**
|
|
2
|
+
/** Unread notification count */
|
|
3
3
|
unreadCount: number;
|
|
4
|
-
/**
|
|
4
|
+
/** Last notification timestamp (used for bubble animation) */
|
|
5
5
|
lastNotificationAt: number | null;
|
|
6
6
|
}
|
|
7
7
|
export interface NotificationActions {
|
|
8
|
-
/**
|
|
8
|
+
/** Mark all notifications as read */
|
|
9
9
|
markAsRead(): void;
|
|
10
|
-
/**
|
|
10
|
+
/** Clear all notification state */
|
|
11
11
|
clearAll(): void;
|
|
12
12
|
}
|
|
13
13
|
export interface NotificationContextValue {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../src/contexts/notification.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,iBAAiB;IAC9B,
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../src/contexts/notification.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,iBAAiB;IAC9B,gCAAgC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,mBAAmB;IAChC,qCAAqC;IACrC,UAAU,IAAI,IAAI,CAAC;IACnB,mCAAmC;IACnC,QAAQ,IAAI,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,EAAE,mBAAmB,CAAC;CAChC;AAED,eAAO,MAAM,mBAAmB;;CAE/B,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,iBAGxC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Settings Context —
|
|
2
|
+
* Settings Context — global settings state and actions
|
|
3
3
|
*
|
|
4
4
|
* Provided by: <rtc-agent> (root)
|
|
5
|
-
* Consumed by: <rtc-settings-layout>,
|
|
5
|
+
* Consumed by: <rtc-settings-layout>, various feature components
|
|
6
6
|
*/
|
|
7
7
|
export interface SettingsState {
|
|
8
8
|
appearance: {
|
package/dist/contexts/skill.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Skill Context
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Provides Skill system state to child components
|
|
5
5
|
*
|
|
6
6
|
* Provided by: <rtc-agent> (root)
|
|
7
|
-
* Consumed by:
|
|
7
|
+
* Consumed by: future Skill panels, Function list components, etc.
|
|
8
8
|
*/
|
|
9
9
|
import type { FunctionRegistry } from '../core/function-registry.js';
|
|
10
10
|
/**
|
|
11
|
-
* Skill Context
|
|
11
|
+
* Skill Context value
|
|
12
12
|
*/
|
|
13
13
|
export interface SkillContextValue {
|
|
14
|
-
/** Function
|
|
14
|
+
/** Function registry instance */
|
|
15
15
|
registry: FunctionRegistry | null;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Skill Context
|
|
18
|
+
* Skill Context default value
|
|
19
19
|
*/
|
|
20
20
|
export declare const DEFAULT_SKILL_STATE: SkillContextValue;
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/contexts/skill.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,
|
|
1
|
+
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/contexts/skill.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,iCAAiC;IACjC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,iBAEjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY;;CAA4D,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Turn Count Context —
|
|
2
|
+
* Turn Count Context — Number of active turns in the current session.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Provided by the `<rtc-agent>` root component, consumed by `<rtc-input-area>`,
|
|
5
|
+
* used to determine the send button icon / disabled state.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* EntityRepository
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* Data source: write-time aggregation from the persistence layer. On each turn-related update,
|
|
8
|
+
* EntityRepository writes back pending_turn_count / running_turn_count to the sessions row,
|
|
9
|
+
* UIUpdateBus automatically publishes a session.updated event,
|
|
10
|
+
* and the root component subscribes and reads these two fields from the session row into this context.
|
|
11
11
|
*
|
|
12
12
|
* Provided by: <rtc-agent> (root)
|
|
13
13
|
* Consumed by: <rtc-input-area>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Activity Controller
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Manages activity state in VS Code-style layout (explorer/chat/settings).
|
|
5
5
|
*
|
|
6
6
|
* Corresponds to: `ActivityContext` (defined in `contexts/activity.ts`).
|
|
7
7
|
* Provided by: `<rtc-agent>` (root)
|
|
8
|
-
* Consumed by: `<rtc-activity-bar>`, `<rtc-agent>` (
|
|
8
|
+
* Consumed by: `<rtc-activity-bar>`, `<rtc-agent>` (conditional layout rendering)
|
|
9
9
|
*
|
|
10
|
-
* ##
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
10
|
+
* ## Persistence
|
|
11
|
+
* - Saves current active activity and sidebarVisible state via localStorage
|
|
12
|
+
* - Restores to last activity on page refresh
|
|
13
13
|
*/
|
|
14
14
|
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
15
15
|
import type { Activity } from '../types/index.js';
|
|
@@ -20,9 +20,9 @@ export declare class ActivityController implements ReactiveController {
|
|
|
20
20
|
private _state;
|
|
21
21
|
readonly actions: ActivityActions;
|
|
22
22
|
get value(): ActivityContextValue;
|
|
23
|
-
/**
|
|
23
|
+
/** Current activity (readonly quick access) */
|
|
24
24
|
get active(): Activity;
|
|
25
|
-
/**
|
|
25
|
+
/** Whether sidebar is visible (readonly quick access) */
|
|
26
26
|
get sidebarVisible(): boolean;
|
|
27
27
|
constructor(host: ReactiveControllerHost);
|
|
28
28
|
hostConnected(): void;
|
|
@@ -30,11 +30,11 @@ export declare class ActivityController implements ReactiveController {
|
|
|
30
30
|
private _restore;
|
|
31
31
|
private _persist;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Set activity
|
|
34
34
|
*
|
|
35
|
-
*
|
|
36
|
-
* -
|
|
37
|
-
* -
|
|
35
|
+
* Logic:
|
|
36
|
+
* - Click current activity → toggle sidebar
|
|
37
|
+
* - Click different activity → switch activity and show sidebar
|
|
38
38
|
*/
|
|
39
39
|
private _setActivity;
|
|
40
40
|
private _showSidebar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/activity.controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAC,kBAAkB,EAAE,sBAAsB,EAAC,MAAM,KAAK,CAAC;AACpE,OAAO,KAAK,EAAC,QAAQ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cAAc;IAStB,OAAO,CAAC,MAAM;CAKjB"}
|
|
@@ -174,6 +174,11 @@ export declare class AuthController implements ReactiveController {
|
|
|
174
174
|
* that could corrupt localStorage (parse-modify-write race).
|
|
175
175
|
*/
|
|
176
176
|
handleTokenExpired(): Promise<TokenExpiredAction>;
|
|
177
|
+
/**
|
|
178
|
+
* Execute refresh with concurrency guard to prevent race conditions.
|
|
179
|
+
* If a refresh is already in-flight, wait for it; otherwise start a new one.
|
|
180
|
+
*/
|
|
181
|
+
private _executeRefreshWithGuard;
|
|
177
182
|
/**
|
|
178
183
|
* Internal: execute the refresh flow, update state + localStorage.
|
|
179
184
|
* Returns true on success, false on failure.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/auth.controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAC,kBAAkB,EAAE,sBAAsB,EAAC,MAAM,KAAK,CAAC;AACpE,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AActD,UAAU,eAAe;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,cAAe,YAAW,kBAAkB;IACrD,IAAI,EAAE,sBAAsB,GAAG,WAAW,CAAC;IAE3C,OAAO,CAAC,MAAM,CAAsC;IACpD,OAAO,CAAC,aAAa,CAAC,CAAgC;IACtD,OAAO,CAAC,uBAAuB,CAAC,CAAa;IAC7C,+EAA+E;IAC/E,OAAO,CAAC,WAAW,CAAC,C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Bf;;;;;;;;OAQG;IACH,OAAO,CAAC,cAAc;IA0BtB,oCAAoC;IACpC,OAAO,CAAC,WAAW;IAgEnB,kCAAkC;IAClC,OAAO,CAAC,WAAW;IAKnB,4BAA4B;IAC5B,OAAO,CAAC,gBAAgB;IAiBxB;;;OAGG;YACW,eAAe;IA4C7B;;;;;;;;;OASG;IACG,kBAAkB,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAyBvD;;;OAGG;YACW,wBAAwB;IAetC;;;OAGG;YACW,UAAU;IA6GxB,wDAAwD;IACxD,OAAO,CAAC,mBAAmB;IAY3B;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,UAAU;CAYrB"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Editor Area Controller
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
4
|
+
* Manages Editor Area state:
|
|
5
|
+
* - Open file tab list
|
|
6
|
+
* - Current active file
|
|
7
|
+
* - Content and dirty state per tab
|
|
8
|
+
* - View mode per tab
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Provides actions for components or Debug HTML to call.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* -
|
|
14
|
-
* -
|
|
15
|
-
* -
|
|
16
|
-
* -
|
|
17
|
-
* -
|
|
12
|
+
* Design notes:
|
|
13
|
+
* - Only one tab allowed per path (idempotent open)
|
|
14
|
+
* - activeFilePath clears after closing the last tab
|
|
15
|
+
* - Auto-switches to adjacent tab after closing the active tab
|
|
16
|
+
* - Marks isDirty on content change
|
|
17
|
+
* - Clears isDirty on save (actual VFS write handled externally)
|
|
18
18
|
*
|
|
19
|
-
* ##
|
|
20
|
-
* -
|
|
21
|
-
*
|
|
19
|
+
* ## Persistence
|
|
20
|
+
* - Saves the open tab list (filePath, viewMode, cursorPosition)
|
|
21
|
+
* and activeFilePath via localStorage. Content is not persisted;
|
|
22
|
+
* it is reloaded from VFS after refresh.
|
|
22
23
|
*/
|
|
23
24
|
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
24
25
|
import type { EditorTab, EditorViewMode } from '../types/index.js';
|
|
@@ -27,30 +28,30 @@ export interface EditorAreaState {
|
|
|
27
28
|
activeFilePath: string;
|
|
28
29
|
}
|
|
29
30
|
export interface EditorAreaActions {
|
|
30
|
-
/**
|
|
31
|
+
/** Open a file (idempotent: switches to existing tab if already open) */
|
|
31
32
|
openFile(filePath: string, content: string, viewMode?: EditorViewMode): void;
|
|
32
|
-
/**
|
|
33
|
+
/** Close a tab */
|
|
33
34
|
closeFile(filePath: string): void;
|
|
34
|
-
/**
|
|
35
|
+
/** Close all tabs */
|
|
35
36
|
closeAll(): void;
|
|
36
|
-
/**
|
|
37
|
+
/** Switch to a specific tab */
|
|
37
38
|
switchTab(filePath: string): void;
|
|
38
|
-
/**
|
|
39
|
+
/** Update content (auto-marks dirty) */
|
|
39
40
|
updateContent(filePath: string, content: string): void;
|
|
40
|
-
/**
|
|
41
|
+
/** Save file (clears dirty flag) */
|
|
41
42
|
saveFile(filePath: string): void;
|
|
42
|
-
/**
|
|
43
|
+
/** Set view mode */
|
|
43
44
|
setViewMode(filePath: string, viewMode: EditorViewMode): void;
|
|
44
|
-
/**
|
|
45
|
+
/** Update cursor position */
|
|
45
46
|
setCursorPosition(filePath: string, position: {
|
|
46
47
|
line: number;
|
|
47
48
|
column: number;
|
|
48
49
|
}): void;
|
|
49
50
|
/**
|
|
50
|
-
*
|
|
51
|
+
* Silently set file content (does not mark dirty)
|
|
51
52
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
53
|
+
* Used to reload content from VFS into restored tabs after refresh.
|
|
54
|
+
* Creates a new tab if the tab does not exist.
|
|
54
55
|
*/
|
|
55
56
|
loadContent(filePath: string, content: string): void;
|
|
56
57
|
}
|
|
@@ -58,7 +59,7 @@ export declare class EditorAreaController implements ReactiveController {
|
|
|
58
59
|
private _host;
|
|
59
60
|
private _tabs;
|
|
60
61
|
private _activeFilePath;
|
|
61
|
-
/**
|
|
62
|
+
/** Cursor position persistence throttle: avoid frequent localStorage writes */
|
|
62
63
|
private _cursorPersistTimer?;
|
|
63
64
|
readonly actions: EditorAreaActions;
|
|
64
65
|
constructor(host: ReactiveControllerHost);
|
|
@@ -71,48 +72,48 @@ export declare class EditorAreaController implements ReactiveController {
|
|
|
71
72
|
get activeFilePath(): string;
|
|
72
73
|
get activeTab(): EditorTab | undefined;
|
|
73
74
|
/**
|
|
74
|
-
*
|
|
75
|
+
* Open a file
|
|
75
76
|
*
|
|
76
|
-
*
|
|
77
|
+
* Idempotent: if file is already open, only switches the tab without overwriting content.
|
|
77
78
|
*/
|
|
78
79
|
private _openFile;
|
|
79
80
|
/**
|
|
80
|
-
*
|
|
81
|
+
* Close a tab
|
|
81
82
|
*
|
|
82
|
-
*
|
|
83
|
+
* Auto-switches to adjacent tab after closing. Clears activeFilePath if closing the last tab.
|
|
83
84
|
*/
|
|
84
85
|
private _closeFile;
|
|
85
86
|
/**
|
|
86
|
-
*
|
|
87
|
+
* Close all tabs
|
|
87
88
|
*/
|
|
88
89
|
private _closeAll;
|
|
89
90
|
/**
|
|
90
|
-
*
|
|
91
|
+
* Switch to a specific tab
|
|
91
92
|
*/
|
|
92
93
|
private _switchTab;
|
|
93
94
|
/**
|
|
94
|
-
*
|
|
95
|
+
* Update content (auto-marks dirty)
|
|
95
96
|
*/
|
|
96
97
|
private _updateContent;
|
|
97
98
|
/**
|
|
98
|
-
*
|
|
99
|
+
* Save file (clears dirty flag)
|
|
99
100
|
*
|
|
100
|
-
*
|
|
101
|
+
* Note: actual VFS write is handled externally by listening to the editor-area-save event.
|
|
101
102
|
*/
|
|
102
103
|
private _saveFile;
|
|
103
104
|
/**
|
|
104
|
-
*
|
|
105
|
+
* Set view mode
|
|
105
106
|
*/
|
|
106
107
|
private _setViewMode;
|
|
107
108
|
/**
|
|
108
|
-
*
|
|
109
|
+
* Update cursor position
|
|
109
110
|
*/
|
|
110
111
|
private _setCursorPosition;
|
|
111
112
|
/**
|
|
112
|
-
*
|
|
113
|
+
* Silently set file content (does not mark dirty)
|
|
113
114
|
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
115
|
+
* Used to reload content from VFS into restored tabs after refresh.
|
|
116
|
+
* Creates a new tab if the tab does not exist.
|
|
116
117
|
*/
|
|
117
118
|
private _loadContent;
|
|
118
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-area.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/editor-area.controller.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"editor-area.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/editor-area.controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAC,kBAAkB,EAAE,sBAAsB,EAAC,MAAM,KAAK,CAAC;AACpE,OAAO,KAAK,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAkBjE,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAC9B,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAC7E,kBAAkB;IAClB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,qBAAqB;IACrB,QAAQ,IAAI,IAAI,CAAC;IACjB,+BAA+B;IAC/B,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,wCAAwC;IACxC,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvD,oCAAoC;IACpC,Q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;;OAKG;IACH,OAAO,CAAC,YAAY;CA0BvB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Editor Controller
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Manages editor state: view mode, toolbar button availability.
|
|
5
5
|
*
|
|
6
|
-
* Phase 2.5
|
|
7
|
-
*
|
|
6
|
+
* Phase 2.5 only implements toolbar-related state; tab management (openTabs / activeFile)
|
|
7
|
+
* is deferred to Phase 2.7.
|
|
8
8
|
*
|
|
9
9
|
* Provided by: <rtc-agent> (root)
|
|
10
10
|
* Consumed by: <rtc-editor-toolbar>, <rtc-editor-area>
|