@rtc-agent/component 0.2.7-rc.4 → 0.2.8-rc.1
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-9e1nrE9Q.js} +56 -8
- package/dist/factory.d.ts.map +1 -1
- package/dist/{highlight-languages-8EK0uwTA.js → highlight-languages-BcRFTMSx.js} +1 -1
- package/dist/icons/logo.d.ts +5 -5
- package/dist/{index-Bd4j91y1.js → index-CEn11pPK.js} +26829 -22588
- 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 +3303 -1120
- 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,52 +1,54 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RTC Activity Bar Component
|
|
3
3
|
*
|
|
4
|
-
* VS Code
|
|
4
|
+
* VS Code-style left activity bar, supporting switching between Explorer/Chat/Settings.
|
|
5
5
|
*
|
|
6
6
|
* @element rtc-activity-bar
|
|
7
|
-
* @fires activity-change -
|
|
7
|
+
* @fires activity-change - Fired on activity switch (detail: { activity, toggleSidebar })
|
|
8
8
|
*
|
|
9
|
-
* ##
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
* - ↑/↓
|
|
9
|
+
* ## Interaction logic
|
|
10
|
+
* - Click current activity → toggle sidebar (dispatches activity-change event, toggleSidebar: true)
|
|
11
|
+
* - Click different activity → switch activity and show sidebar (dispatches activity-change event, toggleSidebar: false)
|
|
12
|
+
* - ↑/↓ arrow keys switch between icons (roving tabindex), Enter/Space to activate
|
|
13
13
|
*
|
|
14
|
-
* ##
|
|
15
|
-
*
|
|
14
|
+
* ## Styling
|
|
15
|
+
* Uses project design tokens (--rtc-color-*), supports light/dark themes.
|
|
16
16
|
*/
|
|
17
17
|
import { LitElement } from 'lit';
|
|
18
18
|
import type { Activity } from '../../types/index.js';
|
|
19
19
|
export declare class RtcActivityBar extends LitElement {
|
|
20
20
|
static styles: import("lit").CSSResult;
|
|
21
|
-
/**
|
|
21
|
+
/** Current activity */
|
|
22
22
|
active: Activity;
|
|
23
|
-
/**
|
|
23
|
+
/** Whether to show the Files button */
|
|
24
24
|
showFiles: boolean;
|
|
25
|
-
/**
|
|
25
|
+
/** Whether to show the Settings button */
|
|
26
26
|
showSettings: boolean;
|
|
27
|
+
/** Whether to show the Functions button */
|
|
28
|
+
showFunctions: boolean;
|
|
27
29
|
private _localeCtx;
|
|
28
30
|
/**
|
|
29
|
-
*
|
|
31
|
+
* Handle activity icon click
|
|
30
32
|
*
|
|
31
|
-
*
|
|
32
|
-
* -
|
|
33
|
-
* -
|
|
33
|
+
* Logic:
|
|
34
|
+
* - Click current activity → toggleSidebar: true
|
|
35
|
+
* - Click different activity → switch activity, toggleSidebar: false
|
|
34
36
|
*/
|
|
35
37
|
private _handleClick;
|
|
36
38
|
/**
|
|
37
|
-
*
|
|
39
|
+
* Keyboard event handling
|
|
38
40
|
*
|
|
39
|
-
* -
|
|
40
|
-
* - Enter/Space
|
|
41
|
-
* - Home/End
|
|
41
|
+
* - ↑/↓: move focus between available activities (roving tabindex)
|
|
42
|
+
* - Enter/Space: activate current activity
|
|
43
|
+
* - Home/End: jump to first/last item
|
|
42
44
|
*/
|
|
43
45
|
private _handleKeydown;
|
|
44
46
|
/**
|
|
45
|
-
*
|
|
47
|
+
* Move focus to a specific activity icon (roving tabindex)
|
|
46
48
|
*/
|
|
47
49
|
private _focusActivity;
|
|
48
50
|
/**
|
|
49
|
-
*
|
|
51
|
+
* Compute roving tabindex: the currently active activity gets tabindex=0, others get -1
|
|
50
52
|
*/
|
|
51
53
|
private _tabIndex;
|
|
52
54
|
render(): import("lit").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rtc-activity-bar.d.ts","sourceRoot":"","sources":["../../../src/components/activity-bar/rtc-activity-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAC,UAAU,EAAgB,MAAM,KAAK,CAAC;AAK9C,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"rtc-activity-bar.d.ts","sourceRoot":"","sources":["../../../src/components/activity-bar/rtc-activity-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAC,UAAU,EAAgB,MAAM,KAAK,CAAC;AAK9C,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAenD,qBAEa,cAAe,SAAQ,UAAU;IAC1C,MAAM,CAAC,MAAM,0BAAU;IAEvB,uBAAuB;IAEvB,MAAM,EAAE,QAAQ,CAAU;IAE1B,uCAAuC;IAEvC,SAAS,UAAQ;IAEjB,0CAA0C;IAE1C,YAAY,UAAQ;IAEpB,2CAA2C;IAE3C,aAAa,UAAQ;IAIrB,OAAO,CAAC,UAAU,CAMhB;IAEF;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAcpB;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IAyCtB;;OAEG;IACH,OAAO,CAAC,cAAc;IAKtB;;OAEG;IACH,OAAO,CAAC,SAAS;IAIjB,MAAM;CA+DT;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,kBAAkB,EAAE,cAAc,CAAC;KACtC;IAED,UAAU,mBAAmB;QACzB,iBAAiB,EAAE,WAAW,CAAC;YAC3B,QAAQ,EAAE,QAAQ,CAAC;YACnB,aAAa,EAAE,OAAO,CAAC;SAC1B,CAAC,CAAC;KACN;CACJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Activity Bar
|
|
2
|
+
* Activity Bar styles
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Uses project design tokens (--rtc-color-*) for multi-theme support.
|
|
5
5
|
*/
|
|
6
6
|
export declare const styles: import("lit").CSSResult;
|
|
7
7
|
//# sourceMappingURL=rtc-activity-bar.styles.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RTC Chat Layout Component
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
4
|
+
* Two-column chat layout page:
|
|
5
|
+
* - Left column: rtc-session-tree (session tree)
|
|
6
|
+
* - Right column: rtc-session-tab-bar (tab bar) + chat content area
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* Clicking a session tree node → opens/switches tab → chat content area displays that session's messages.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
* rtc-input-area / rtc-overlay-manager
|
|
12
|
-
* currentSessionId
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* The chat content area reuses existing components (rtc-content-area / rtc-notice-bar /
|
|
11
|
+
* rtc-input-area / rtc-overlay-manager). It switches between sessions via
|
|
12
|
+
* currentSessionId from SessionContext, and passes MessageRepository to
|
|
13
|
+
* rtc-content-area → rtc-message-list through the messageController property,
|
|
14
|
+
* achieving independent message instances per tab.
|
|
15
15
|
*
|
|
16
16
|
* @element rtc-chat-layout
|
|
17
|
-
* @fires rtc-chat-layout-session-select -
|
|
18
|
-
* @fires rtc-chat-layout-tab-activate -
|
|
19
|
-
* @fires rtc-chat-layout-tab-close -
|
|
20
|
-
* @fires rtc-fork-initiated -
|
|
21
|
-
* @fires rtc-new-session -
|
|
17
|
+
* @fires rtc-chat-layout-session-select - User clicks a session tree node (detail: { sessionId })
|
|
18
|
+
* @fires rtc-chat-layout-tab-activate - User switches tab (detail: { sessionId })
|
|
19
|
+
* @fires rtc-chat-layout-tab-close - User closes tab (detail: { sessionId })
|
|
20
|
+
* @fires rtc-fork-initiated - Fork request orchestration complete (detail: { oldSessionClientId, oldMessageClientId, newSessionClientId, content })
|
|
21
|
+
* @fires rtc-new-session - New session (including auto-create after all tabs closed)
|
|
22
22
|
*/
|
|
23
23
|
import { LitElement, type PropertyValues } from 'lit';
|
|
24
24
|
import '../session-tree/rtc-session-tree.js';
|
|
@@ -32,35 +32,36 @@ import '../drawer/rtc-drawer.js';
|
|
|
32
32
|
export declare class RtcChatLayout extends LitElement {
|
|
33
33
|
static styles: import("lit").CSSResult[];
|
|
34
34
|
private _localeCtx;
|
|
35
|
-
/**
|
|
35
|
+
/** Theme: light / dark / system */
|
|
36
36
|
theme: 'light' | 'dark' | 'system';
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Whether the session tree (.sidebar) is visible
|
|
39
39
|
*
|
|
40
|
-
*
|
|
41
|
-
* -
|
|
42
|
-
* -
|
|
40
|
+
* Passed through from parent rtc-agent based on ActivityController.sidebarVisible:
|
|
41
|
+
* - Click "chat" activity bar icon → toggleSidebar → false → hide
|
|
42
|
+
* - Click again → toggleSidebar → true → expand
|
|
43
43
|
*/
|
|
44
44
|
sessionTreeVisible: boolean;
|
|
45
45
|
/** Message controller for repository access (passed to rtc-content-area). */
|
|
46
46
|
messageController?: MessageController;
|
|
47
|
-
/**
|
|
47
|
+
/** Whether currently dragging the resize handle */
|
|
48
48
|
private _isResizing;
|
|
49
|
-
/**
|
|
49
|
+
/** Y coordinate when drag started */
|
|
50
50
|
private _resizeStartY;
|
|
51
|
-
/**
|
|
51
|
+
/** input-area height when drag started */
|
|
52
52
|
private _resizeStartHeight;
|
|
53
|
-
/**
|
|
53
|
+
/** Session ID of the current drag operation */
|
|
54
54
|
private _resizeSessionId;
|
|
55
|
-
/**
|
|
55
|
+
/** Minimum input-area height */
|
|
56
56
|
private static readonly MIN_INPUT_HEIGHT;
|
|
57
|
-
/**
|
|
57
|
+
/** Maximum input-area height */
|
|
58
58
|
private static readonly MAX_INPUT_HEIGHT;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Set of sessions that have already had their saved height applied
|
|
61
61
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
62
|
+
* Used to avoid repeated application: each session's input-area height is
|
|
63
|
+
* applied only once on first render. When a session is newly created
|
|
64
|
+
* (not in the set), the saved height is applied.
|
|
64
65
|
*/
|
|
65
66
|
private _heightAppliedSessions;
|
|
66
67
|
private _sessionCtx;
|
|
@@ -68,106 +69,106 @@ export declare class RtcChatLayout extends LitElement {
|
|
|
68
69
|
connectedCallback(): void;
|
|
69
70
|
disconnectedCallback(): void;
|
|
70
71
|
/**
|
|
71
|
-
*
|
|
72
|
+
* After component update, check whether saved input-area height needs to be applied
|
|
72
73
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* 1.
|
|
76
|
-
* 2.
|
|
77
|
-
* 3.
|
|
74
|
+
* After each update, iterate all tabs and apply the saved height from localStorage
|
|
75
|
+
* for sessions that haven't had it applied yet. This ensures:
|
|
76
|
+
* 1. On initial load, saved height is applied immediately after tabs render
|
|
77
|
+
* 2. When creating a new tab, saved height is also applied
|
|
78
|
+
* 3. Each session has height applied only once, avoiding overwriting user's drag adjustments
|
|
78
79
|
*/
|
|
79
80
|
protected updated(_changedProperties: PropertyValues): void;
|
|
80
|
-
/**
|
|
81
|
+
/** Clear the active tab's input box (called for Escape key, etc.) */
|
|
81
82
|
private _boundOnClearActiveInput;
|
|
82
|
-
/**
|
|
83
|
+
/** Clear the active tab's input box */
|
|
83
84
|
clearActiveInput(): void;
|
|
84
85
|
/**
|
|
85
|
-
*
|
|
86
|
+
* Begin dragging resize handle
|
|
86
87
|
*
|
|
87
|
-
*
|
|
88
|
+
* Records initial state, sets drag flag.
|
|
88
89
|
*/
|
|
89
90
|
private _handleResizeStart;
|
|
90
|
-
/**
|
|
91
|
+
/** Global mousemove handler */
|
|
91
92
|
private _boundOnResizeMouseMove;
|
|
92
|
-
/**
|
|
93
|
+
/** Global mouseup handler */
|
|
93
94
|
private _boundOnResizeMouseUp;
|
|
94
95
|
/**
|
|
95
|
-
*
|
|
96
|
+
* Save input-area height to localStorage
|
|
96
97
|
*
|
|
97
|
-
*
|
|
98
|
+
* Height is a global setting (shared across all tabs), not per-session.
|
|
98
99
|
*/
|
|
99
100
|
private _saveInputAreaHeight;
|
|
100
101
|
/**
|
|
101
|
-
*
|
|
102
|
+
* Load input-area height from localStorage
|
|
102
103
|
*
|
|
103
|
-
*
|
|
104
|
+
* Returns null if no saved height exists, use default value.
|
|
104
105
|
*/
|
|
105
106
|
private _loadInputAreaHeight;
|
|
106
107
|
/**
|
|
107
|
-
*
|
|
108
|
+
* Apply saved height to specified session's input-area
|
|
108
109
|
*/
|
|
109
110
|
private _applyStoredHeight;
|
|
110
|
-
/**
|
|
111
|
+
/** Get the input-area element for a given sessionId */
|
|
111
112
|
private _getInputAreaBySession;
|
|
112
113
|
/**
|
|
113
|
-
*
|
|
114
|
+
* Core orchestration: ensure an unsaved tab exists
|
|
114
115
|
*
|
|
115
|
-
* -
|
|
116
|
-
* -
|
|
116
|
+
* - Already has unsaved tab → activate it, return its sessionId
|
|
117
|
+
* - None exists → create new session + open unsaved tab, return newId
|
|
117
118
|
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
119
|
+
* Synchronous method (no await), ensures double-click "+" is idempotent:
|
|
120
|
+
* second call finds existing tab via findUnsavedTab immediately.
|
|
120
121
|
*
|
|
121
|
-
* @param params
|
|
122
|
+
* @param params Optional transient UI parameters (fork content, notice message, etc.)
|
|
122
123
|
*/
|
|
123
124
|
private _ensureUnsavedSession;
|
|
124
125
|
private _boundOnForkRequested;
|
|
125
126
|
private _boundOnMessageSent;
|
|
126
|
-
/** session-header / session-tree "+"
|
|
127
|
+
/** session-header / session-tree "+" button event forwarded to _handleNewSession */
|
|
127
128
|
private _handleSessionTreeNew;
|
|
128
|
-
/** Toast
|
|
129
|
+
/** Toast notification click: navigate to corresponding session (with reopen check) */
|
|
129
130
|
private _handleNotificationClick;
|
|
130
131
|
/**
|
|
131
|
-
*
|
|
132
|
+
* Open or activate tab for specified session
|
|
132
133
|
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
134
|
+
* Looks up session from SessionContext's sessions list to get the title.
|
|
135
|
+
* If session doesn't exist (e.g., newly created session not yet persisted), uses 'Untitled' as placeholder title.
|
|
136
|
+
* `_loadSessions` will sync real titles later via `updateTabTitles`.
|
|
136
137
|
*/
|
|
137
138
|
private _ensureTabForSession;
|
|
138
139
|
/**
|
|
139
|
-
*
|
|
140
|
+
* Session tree node click
|
|
140
141
|
*
|
|
141
|
-
* 1.
|
|
142
|
-
* 2.
|
|
143
|
-
* 3.
|
|
142
|
+
* 1. Check session status, if closed then call reopenSession first
|
|
143
|
+
* 2. Open/switch to corresponding tab
|
|
144
|
+
* 3. Switch SessionContext's currentSessionId (triggers chat content refresh)
|
|
144
145
|
*/
|
|
145
146
|
private _handleTreeSelect;
|
|
146
147
|
/**
|
|
147
|
-
*
|
|
148
|
+
* Open session (with transparent reopen check)
|
|
148
149
|
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
150
|
+
* If session status is closed, call reopenSession to reopen it first.
|
|
151
|
+
* After success, perform UI operations (open tab + switch session).
|
|
151
152
|
*/
|
|
152
153
|
private _openWithReopenCheck;
|
|
153
154
|
/**
|
|
154
|
-
*
|
|
155
|
+
* Expand/collapse click (handled internally by SessionTreeController, no extra logic needed here)
|
|
155
156
|
*/
|
|
156
157
|
private _handleTreeToggle;
|
|
157
158
|
/**
|
|
158
|
-
*
|
|
159
|
+
* New session button click
|
|
159
160
|
*
|
|
160
|
-
*
|
|
161
|
-
* -
|
|
162
|
-
* -
|
|
161
|
+
* Uses _ensureUnsavedSession to ensure unsaved tab uniqueness:
|
|
162
|
+
* - Already has unsaved tab → focus it
|
|
163
|
+
* - None exists → create new session + open unsaved tab
|
|
163
164
|
*
|
|
164
|
-
*
|
|
165
|
+
* Dispatches rtc-new-session, rtc-agent clears fork state.
|
|
165
166
|
*/
|
|
166
167
|
private _handleNewSession;
|
|
167
168
|
/**
|
|
168
|
-
*
|
|
169
|
+
* Switch tab
|
|
169
170
|
*
|
|
170
|
-
*
|
|
171
|
+
* Switches SessionContext's currentSessionId.
|
|
171
172
|
*/
|
|
172
173
|
private _handleTabActivate;
|
|
173
174
|
/**
|
|
@@ -178,15 +179,21 @@ export declare class RtcChatLayout extends LitElement {
|
|
|
178
179
|
*/
|
|
179
180
|
private _updateTabVisibility;
|
|
180
181
|
/**
|
|
181
|
-
*
|
|
182
|
+
* Close tab
|
|
182
183
|
*
|
|
183
|
-
* SessionTabController
|
|
184
|
-
*
|
|
185
|
-
*
|
|
184
|
+
* SessionTabController automatically handles adjacent tab activation.
|
|
185
|
+
* If closing the currently active session, need to switch to the newly activated tab;
|
|
186
|
+
* if no tabs remain (requirement 4), immediately call _handleNewSession to create a new unsaved tab.
|
|
186
187
|
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
188
|
+
* Note: cannot read post-close state via this._tabCtx.state,
|
|
189
|
+
* because @consume context updates are asynchronous (wait for Lit's next render cycle).
|
|
190
|
+
* Here we synchronously calculate remaining tabs to determine next step.
|
|
191
|
+
*/
|
|
192
|
+
/**
|
|
193
|
+
* Handle tab close event: close session on backend, switch to adjacent tab,
|
|
194
|
+
* or create new unsaved tab if no tabs remain.
|
|
195
|
+
*
|
|
196
|
+
* Fix 44: If closeSession fails, restore the tab and show error toast.
|
|
190
197
|
*/
|
|
191
198
|
private _handleTabClose;
|
|
192
199
|
private _renderChatContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rtc-chat-layout.d.ts","sourceRoot":"","sources":["../../../src/components/chat-layout/rtc-chat-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAC,UAAU,EAAQ,KAAK,cAAc,EAAC,MAAM,KAAK,CAAC;AAqB1D,OAAO,qCAAqC,CAAC;AAC7C,OAAO,wCAAwC,CAAC;AAChD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,iCAAiC,CAAC;AACzC,OAAO,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,yCAAyC,CAAC;AAC/E,OAAO,mCAAmC,CAAC;AAC3C,OAAO,yBAAyB,CAAC;AAEjC,qBAEa,aAAc,SAAQ,UAAU;IACzC,MAAM,CAAC,MAAM,4BAAuD;IAMpE,OAAO,CAAC,UAAU,CAMhB;IAEF
|
|
1
|
+
{"version":3,"file":"rtc-chat-layout.d.ts","sourceRoot":"","sources":["../../../src/components/chat-layout/rtc-chat-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAC,UAAU,EAAQ,KAAK,cAAc,EAAC,MAAM,KAAK,CAAC;AAqB1D,OAAO,qCAAqC,CAAC;AAC7C,OAAO,wCAAwC,CAAC;AAChD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,iCAAiC,CA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4
|
-
*
|
|
5
|
-
* - rtc-drawer overlay
|
|
6
|
-
* -
|
|
4
|
+
* Layout:
|
|
5
|
+
* - rtc-drawer overlay drawer (session tree, slides in from the left, does not push main content)
|
|
6
|
+
* - Right column: TabBar + chat content area (flex: 1)
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* Colors use project Tokens to ensure dual-theme compatibility.
|
|
9
9
|
*/
|
|
10
10
|
export declare const styles: import("lit").CSSResult;
|
|
11
11
|
//# sourceMappingURL=rtc-chat-layout.styles.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Renders an error feedback message with category-specific icon and color,
|
|
5
5
|
* title, description, optional retry button, and collapsible raw error details.
|
|
6
6
|
*
|
|
7
|
-
* ## Layout model (
|
|
7
|
+
* ## Layout model (timeline layout)
|
|
8
8
|
*
|
|
9
9
|
* Reuses the shared timeline layout (dot + vertical line) from timeline.styles.ts.
|
|
10
10
|
* The dot color reflects the error category.
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Layout:
|
|
8
8
|
* ┌──────────────────┐
|
|
9
|
-
* │
|
|
10
|
-
* │
|
|
11
|
-
* │
|
|
9
|
+
* │ Copy │
|
|
10
|
+
* │ Fork │
|
|
11
|
+
* │ Retry (failed) │
|
|
12
12
|
* ├──────────────────┤
|
|
13
13
|
* │ MM-DD HH:mm │
|
|
14
14
|
* └──────────────────┘
|
|
@@ -22,7 +22,7 @@ export declare class RtcMessageMoreMenu extends LitElement {
|
|
|
22
22
|
private _localeCtx;
|
|
23
23
|
syncStatus: SyncStatus;
|
|
24
24
|
timestamp: number;
|
|
25
|
-
/**
|
|
25
|
+
/** Format timestamp to compact format (delegates to shared utility function) */
|
|
26
26
|
private get _formattedTimestamp();
|
|
27
27
|
private _handleSelect;
|
|
28
28
|
render(): import("lit").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rtc-message-more-menu.d.ts","sourceRoot":"","sources":["../../../src/components/content-area/rtc-message-more-menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAK1C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAMrD,qBAEa,kBAAmB,SAAQ,UAAU;IAC9C,MAAM,CAAC,MAAM,0BAoDX;IAIF,OAAO,CAAC,UAAU,CAMhB;IAGF,UAAU,EAAE,UAAU,CAAY;IAGlC,SAAS,SAAK;IAEd,
|
|
1
|
+
{"version":3,"file":"rtc-message-more-menu.d.ts","sourceRoot":"","sources":["../../../src/components/content-area/rtc-message-more-menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAK1C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAMrD,qBAEa,kBAAmB,SAAQ,UAAU;IAC9C,MAAM,CAAC,MAAM,0BAoDX;IAIF,OAAO,CAAC,UAAU,CAMhB;IAGF,UAAU,EAAE,UAAU,CAAY;IAGlC,SAAS,SAAK;IAEd,gFAAgF;IAChF,OAAO,KAAK,mBAAmB,GAE9B;IAED,OAAO,CAAC,aAAa;IAUrB,MAAM;CAiBT;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,uBAAuB,EAAE,kBAAkB,CAAC;KAC/C;CACJ"}
|