@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
package/dist/types/skill.d.ts
CHANGED
|
@@ -1,194 +1,206 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Skill System Types
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Defines core types for Function, FunctionGroup, VisualHooks, etc.
|
|
5
5
|
*/
|
|
6
6
|
import type { ZodType } from 'zod';
|
|
7
7
|
/**
|
|
8
|
-
* CancelledError -
|
|
8
|
+
* CancelledError - User cancelled operation
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Used to distinguish "user cancellation" from "real errors"
|
|
11
11
|
*
|
|
12
|
-
* M13:
|
|
13
|
-
*
|
|
12
|
+
* M13: Added isCancelled brand property to solve the unreliability of instanceof across realms.
|
|
13
|
+
* Use `CancelledError.isCancelledError(err)` for type guard checks.
|
|
14
14
|
*/
|
|
15
15
|
export declare class CancelledError extends Error {
|
|
16
|
-
/** M13: brand
|
|
16
|
+
/** M13: brand property for reliable cross-realm type checking */
|
|
17
17
|
readonly isCancelled = true;
|
|
18
18
|
constructor(message?: string);
|
|
19
19
|
/**
|
|
20
|
-
* M13:
|
|
21
|
-
*
|
|
20
|
+
* M13: Cross-realm safe type guard
|
|
21
|
+
* More reliable than instanceof (for iframe, Worker, different bundle scenarios, etc.)
|
|
22
22
|
*/
|
|
23
23
|
static isCancelledError(error: unknown): error is CancelledError;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* OpenAPI Schema
|
|
26
|
+
* Parameter definition in OpenAPI Schema format
|
|
27
27
|
*
|
|
28
|
-
*
|
|
29
|
-
* -
|
|
30
|
-
* -
|
|
31
|
-
* -
|
|
32
|
-
* -
|
|
33
|
-
* -
|
|
34
|
-
* -
|
|
28
|
+
* Uses standard OpenAPI 3.0 Schema format, supporting:
|
|
29
|
+
* - Basic types: string, number, integer, boolean
|
|
30
|
+
* - Complex types: object, array
|
|
31
|
+
* - Formats: date, date-time, email, uri, uuid, etc.
|
|
32
|
+
* - Nested objects and arrays
|
|
33
|
+
* - Enum values
|
|
34
|
+
* - Example values (example)
|
|
35
35
|
*/
|
|
36
36
|
export interface OpenAPISchema {
|
|
37
|
-
/**
|
|
38
|
-
type?: 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array';
|
|
39
|
-
/**
|
|
37
|
+
/** Data type */
|
|
38
|
+
type?: 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null';
|
|
39
|
+
/** Data format (e.g. date, date-time, email, uri, uuid, int32, int64, float, double, etc.) */
|
|
40
40
|
format?: string;
|
|
41
|
-
/**
|
|
41
|
+
/** Description */
|
|
42
42
|
description?: string;
|
|
43
|
-
/**
|
|
44
|
-
required?: boolean;
|
|
45
|
-
/**
|
|
43
|
+
/** Whether required (used within object properties) */
|
|
44
|
+
required?: boolean | string[];
|
|
45
|
+
/** Default value */
|
|
46
46
|
default?: unknown;
|
|
47
|
-
/**
|
|
47
|
+
/** Example value */
|
|
48
48
|
example?: unknown;
|
|
49
|
-
/**
|
|
49
|
+
/** Enum values */
|
|
50
50
|
enum?: unknown[];
|
|
51
|
-
/**
|
|
51
|
+
/** Object property definitions */
|
|
52
52
|
properties?: Record<string, OpenAPISchema>;
|
|
53
|
-
/**
|
|
53
|
+
/** Array item definition */
|
|
54
54
|
items?: OpenAPISchema;
|
|
55
|
-
/**
|
|
55
|
+
/** Additional properties for record/map types */
|
|
56
|
+
additionalProperties?: OpenAPISchema | boolean;
|
|
57
|
+
/** Reference to another schema (e.g. '#/components/schemas/User') */
|
|
56
58
|
$ref?: string;
|
|
57
|
-
/**
|
|
59
|
+
/** Minimum value (number/integer) */
|
|
58
60
|
minimum?: number;
|
|
59
|
-
/**
|
|
61
|
+
/** Maximum value (number/integer) */
|
|
60
62
|
maximum?: number;
|
|
61
|
-
/**
|
|
63
|
+
/** Minimum length (string) */
|
|
62
64
|
minLength?: number;
|
|
63
|
-
/**
|
|
65
|
+
/** Maximum length (string) */
|
|
64
66
|
maxLength?: number;
|
|
65
|
-
/**
|
|
67
|
+
/** Regex pattern (string) */
|
|
66
68
|
pattern?: string;
|
|
67
|
-
/**
|
|
69
|
+
/** Minimum item count (array) */
|
|
68
70
|
minItems?: number;
|
|
69
|
-
/**
|
|
71
|
+
/** Maximum item count (array) */
|
|
70
72
|
maxItems?: number;
|
|
71
|
-
/**
|
|
73
|
+
/** Whether duplicate items are allowed (array) */
|
|
72
74
|
uniqueItems?: boolean;
|
|
75
|
+
/** Whether value can be null (OpenAPI 3.0) */
|
|
76
|
+
nullable?: boolean;
|
|
77
|
+
/** One of these schemas (for unions) */
|
|
78
|
+
oneOf?: OpenAPISchema[];
|
|
79
|
+
/** All of these schemas (for intersections) */
|
|
80
|
+
allOf?: OpenAPISchema[];
|
|
81
|
+
/** Any of these schemas */
|
|
82
|
+
anyOf?: OpenAPISchema[];
|
|
73
83
|
}
|
|
74
84
|
/**
|
|
75
|
-
*
|
|
85
|
+
* Parameter definition (OpenAPI format)
|
|
76
86
|
*
|
|
77
|
-
*
|
|
87
|
+
* Uses OpenAPI Schema to define parameter types, supporting complex nested structures.
|
|
78
88
|
*/
|
|
79
89
|
export interface ParameterDef {
|
|
80
|
-
/**
|
|
90
|
+
/** Parameter name */
|
|
81
91
|
name: string;
|
|
82
|
-
/** OpenAPI Schema
|
|
92
|
+
/** OpenAPI Schema definition */
|
|
83
93
|
schema: OpenAPISchema;
|
|
84
|
-
/**
|
|
94
|
+
/** Whether required */
|
|
85
95
|
required?: boolean;
|
|
86
|
-
/**
|
|
96
|
+
/** Parameter description (optional, fallback if schema has no description) */
|
|
87
97
|
description?: string;
|
|
88
98
|
}
|
|
89
99
|
/**
|
|
90
|
-
*
|
|
100
|
+
* Return value definition (OpenAPI format)
|
|
91
101
|
*/
|
|
92
102
|
export interface ReturnDef {
|
|
93
|
-
/** OpenAPI Schema
|
|
94
|
-
schema
|
|
95
|
-
/**
|
|
103
|
+
/** OpenAPI Schema definition */
|
|
104
|
+
schema?: OpenAPISchema;
|
|
105
|
+
/** Zod schema (for runtime validation, takes precedence over schema) */
|
|
106
|
+
zodSchema?: ZodType;
|
|
107
|
+
/** Return value description (optional, fallback if schema has no description) */
|
|
96
108
|
description?: string;
|
|
97
109
|
}
|
|
98
110
|
/**
|
|
99
|
-
* Visual Hooks - UI
|
|
111
|
+
* Visual Hooks - UI hook functions
|
|
100
112
|
*/
|
|
101
113
|
export interface VisualHooks {
|
|
102
|
-
/**
|
|
114
|
+
/** Execution started */
|
|
103
115
|
onStart?: (params: Record<string, unknown>) => void | Promise<void>;
|
|
104
|
-
/**
|
|
116
|
+
/** Execution succeeded */
|
|
105
117
|
onSuccess?: (result: unknown) => void | Promise<void>;
|
|
106
|
-
/**
|
|
118
|
+
/** Execution failed */
|
|
107
119
|
onError?: (error: Error) => void | Promise<void>;
|
|
108
|
-
/**
|
|
120
|
+
/** Execution progress */
|
|
109
121
|
onProgress?: (progress: number) => void | Promise<void>;
|
|
110
122
|
}
|
|
111
123
|
/**
|
|
112
|
-
* Function
|
|
124
|
+
* Function definition
|
|
113
125
|
*/
|
|
114
126
|
export interface FunctionDef {
|
|
115
|
-
/** Function
|
|
127
|
+
/** Function name (e.g. 'user.register') */
|
|
116
128
|
name: string;
|
|
117
|
-
/** Function
|
|
129
|
+
/** Function description */
|
|
118
130
|
description: string;
|
|
119
|
-
/**
|
|
131
|
+
/** Parameter list (OpenAPI format, backward compatible) */
|
|
120
132
|
parameters?: ParameterDef[];
|
|
121
|
-
/** Zod schema
|
|
133
|
+
/** Zod schema (for runtime validation, takes precedence over parameters) */
|
|
122
134
|
zodSchema?: ZodType;
|
|
123
|
-
/**
|
|
135
|
+
/** Return value definition */
|
|
124
136
|
returns?: ReturnDef;
|
|
125
137
|
/** Visual Hooks */
|
|
126
138
|
hooks?: VisualHooks;
|
|
127
139
|
/**
|
|
128
|
-
*
|
|
140
|
+
* Execution function (second parameter is a progress callback, optional)
|
|
129
141
|
*
|
|
130
|
-
* MD13:
|
|
131
|
-
*
|
|
132
|
-
*
|
|
142
|
+
* MD13: Return type is unknown (no longer uses unknown | Promise<unknown>).
|
|
143
|
+
* Note: handler can be a sync or async function. FunctionRegistry.execute internally awaits the return value,
|
|
144
|
+
* so Promises returned by async functions are automatically resolved. Sync function returns are wrapped in a resolved Promise.
|
|
133
145
|
*/
|
|
134
146
|
handler: (params: Record<string, unknown>, onProgress?: (progress: number) => void | Promise<void>) => unknown;
|
|
135
147
|
}
|
|
136
148
|
/**
|
|
137
|
-
* FunctionGroup
|
|
149
|
+
* FunctionGroup definition
|
|
138
150
|
*/
|
|
139
151
|
export interface FunctionGroupDef {
|
|
140
|
-
/** Group
|
|
152
|
+
/** Group name (e.g. 'user') */
|
|
141
153
|
name: string;
|
|
142
|
-
/** Group
|
|
154
|
+
/** Group description */
|
|
143
155
|
description: string;
|
|
144
156
|
}
|
|
145
157
|
/**
|
|
146
|
-
* Registry
|
|
158
|
+
* Registry configuration
|
|
147
159
|
*/
|
|
148
160
|
export interface RegistryConfig {
|
|
149
|
-
/**
|
|
161
|
+
/** Application name */
|
|
150
162
|
name: string;
|
|
151
|
-
/**
|
|
163
|
+
/** Application description */
|
|
152
164
|
description: string;
|
|
153
|
-
/** AI
|
|
165
|
+
/** AI persona */
|
|
154
166
|
persona?: string;
|
|
155
|
-
/**
|
|
167
|
+
/** Async operation error callback (e.g. document generation failure) */
|
|
156
168
|
onError?: (error: Error, context: string) => void;
|
|
157
169
|
}
|
|
158
170
|
/**
|
|
159
|
-
* Scenario
|
|
171
|
+
* Scenario definition
|
|
160
172
|
*/
|
|
161
173
|
export interface ScenarioDef {
|
|
162
|
-
/** Scenario
|
|
174
|
+
/** Scenario unique identifier (optional, auto-generated from title by default) */
|
|
163
175
|
id?: string;
|
|
164
|
-
/** Scenario
|
|
176
|
+
/** Scenario title */
|
|
165
177
|
title: string;
|
|
166
|
-
/** Scenario
|
|
178
|
+
/** Scenario short description (used for INDEX.md) */
|
|
167
179
|
description?: string;
|
|
168
|
-
/** Scenario
|
|
180
|
+
/** Scenario content (Markdown) */
|
|
169
181
|
content: string;
|
|
170
|
-
/**
|
|
182
|
+
/** Tags */
|
|
171
183
|
tags?: string[];
|
|
172
|
-
/**
|
|
184
|
+
/** Author */
|
|
173
185
|
author?: string;
|
|
174
|
-
/**
|
|
186
|
+
/** Creation time (ISO 8601) */
|
|
175
187
|
createdAt?: string;
|
|
176
188
|
}
|
|
177
189
|
/**
|
|
178
190
|
* Scenario Manifest
|
|
179
191
|
*
|
|
180
|
-
* m10:
|
|
181
|
-
*
|
|
192
|
+
* m10: This type is used in scenario-loader.ts (for parsing manifest.json),
|
|
193
|
+
* and exported via types/index.ts and the package index.ts.
|
|
182
194
|
*/
|
|
183
195
|
export interface ScenarioManifest {
|
|
184
196
|
scenarios: Array<{
|
|
185
|
-
/**
|
|
197
|
+
/** Filename */
|
|
186
198
|
file: string;
|
|
187
|
-
/**
|
|
199
|
+
/** Unique identifier (optional) */
|
|
188
200
|
id?: string;
|
|
189
|
-
/**
|
|
201
|
+
/** Name (optional) */
|
|
190
202
|
name?: string;
|
|
191
|
-
/**
|
|
203
|
+
/** Description (optional) */
|
|
192
204
|
description?: string;
|
|
193
205
|
}>;
|
|
194
206
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/types/skill.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEnC;;;;;;;GAOG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,
|
|
1
|
+
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/types/skill.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEnC;;;;;;;GAOG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,iEAAiE;IACjE,QAAQ,CAAC,WAAW,QAAQ;gBAEhB,OAAO,SAAgC;IAKnD;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,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;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,KAAK,CAAC;QACf,eAAe;QACf,IAAI,EAAE,MAAM,CAAC;QACb,mCAAmC;QACnC,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,sBAAsB;QACtB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,6BAA6B;QAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC,CAAC;CACJ"}
|
|
@@ -1,73 +1,73 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Window Configuration Types
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Window configuration API for the <rtc-agent> component.
|
|
5
|
+
* Controls the window's default state, size, position, interaction constraints, etc.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
|
-
* Bubble
|
|
8
|
+
* Bubble position configuration
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
* -
|
|
12
|
-
* - x
|
|
13
|
-
* - y
|
|
10
|
+
* Uses a mathematical Cartesian coordinate system:
|
|
11
|
+
* - Origin is at one corner of the host application (determined by `corner`)
|
|
12
|
+
* - x-axis: positive to the right, negative to the left
|
|
13
|
+
* - y-axis: positive upward, negative downward (mathematical, not screen coordinates)
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
* - top-left:
|
|
17
|
-
* - top-right:
|
|
18
|
-
* - bottom-left:
|
|
19
|
-
* - bottom-right:
|
|
15
|
+
* Quadrant distribution:
|
|
16
|
+
* - top-left: Quadrant IV (x>0, y<0)
|
|
17
|
+
* - top-right: Quadrant III (x<0, y<0)
|
|
18
|
+
* - bottom-left: Quadrant I (x>0, y>0)
|
|
19
|
+
* - bottom-right: Quadrant II (x<0, y>0)
|
|
20
20
|
*/
|
|
21
21
|
export type BubbleCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
22
22
|
export interface BubblePosition {
|
|
23
|
-
/**
|
|
23
|
+
/** Which corner of the host application is the coordinate origin */
|
|
24
24
|
corner: BubbleCorner;
|
|
25
|
-
/**
|
|
25
|
+
/** Offset relative to the origin (mathematical Cartesian coordinates) */
|
|
26
26
|
offset: {
|
|
27
27
|
x: number;
|
|
28
28
|
y: number;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Window configuration
|
|
33
33
|
*
|
|
34
|
-
*
|
|
34
|
+
* Set via the <rtc-agent>.windowConfig property.
|
|
35
35
|
*/
|
|
36
36
|
export interface WindowConfig {
|
|
37
|
-
/**
|
|
37
|
+
/** Default window mode */
|
|
38
38
|
defaultMode?: 'normal' | 'maximized' | 'minimized';
|
|
39
|
-
/**
|
|
39
|
+
/** Initial position (only effective in normal mode) */
|
|
40
40
|
initialPosition?: {
|
|
41
41
|
x: number;
|
|
42
42
|
y: number;
|
|
43
43
|
};
|
|
44
|
-
/**
|
|
44
|
+
/** Initial size (only effective in normal mode) */
|
|
45
45
|
initialSize?: {
|
|
46
46
|
width: number;
|
|
47
47
|
height: number;
|
|
48
48
|
};
|
|
49
|
-
/**
|
|
49
|
+
/** Minimum width */
|
|
50
50
|
minWidth?: number;
|
|
51
|
-
/**
|
|
51
|
+
/** Minimum height */
|
|
52
52
|
minHeight?: number;
|
|
53
|
-
/**
|
|
53
|
+
/** Maximum width (defaults to viewport width) */
|
|
54
54
|
maxWidth?: number;
|
|
55
|
-
/**
|
|
55
|
+
/** Maximum height (defaults to viewport height) */
|
|
56
56
|
maxHeight?: number;
|
|
57
|
-
/**
|
|
57
|
+
/** Whether dragging is allowed (default: true) */
|
|
58
58
|
draggable?: boolean;
|
|
59
|
-
/**
|
|
59
|
+
/** Whether resizing is allowed (default: true) */
|
|
60
60
|
resizable?: boolean;
|
|
61
|
-
/**
|
|
61
|
+
/** Whether to show the minimize button (default: true) */
|
|
62
62
|
showMinimize?: boolean;
|
|
63
|
-
/**
|
|
63
|
+
/** Whether to show the maximize button (default: true) */
|
|
64
64
|
showMaximize?: boolean;
|
|
65
|
-
/**
|
|
65
|
+
/** Whether to show the close button (default: false; close = minimize) */
|
|
66
66
|
showClose?: boolean;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Embedded mode (disables all window interaction)
|
|
69
69
|
*
|
|
70
|
-
*
|
|
70
|
+
* Equivalent to:
|
|
71
71
|
* - draggable: false
|
|
72
72
|
* - resizable: false
|
|
73
73
|
* - showMinimize: false
|
|
@@ -77,15 +77,15 @@ export interface WindowConfig {
|
|
|
77
77
|
*/
|
|
78
78
|
embedded?: boolean;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Minimized bubble position configuration
|
|
81
81
|
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
82
|
+
* Uses a mathematical Cartesian coordinate system with the origin at one corner of the host application.
|
|
83
|
+
* Default: { corner: 'bottom-right', offset: { x: -20, y: 20 } }
|
|
84
84
|
*/
|
|
85
85
|
bubblePosition?: BubblePosition;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
88
|
+
* Resolved window configuration (all fields have defaults)
|
|
89
89
|
*/
|
|
90
90
|
export interface ResolvedWindowConfig {
|
|
91
91
|
defaultMode: 'normal' | 'maximized' | 'minimized';
|
|
@@ -110,13 +110,13 @@ export interface ResolvedWindowConfig {
|
|
|
110
110
|
bubblePosition: BubblePosition;
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
113
|
+
* Default window configuration
|
|
114
114
|
*/
|
|
115
115
|
export declare const DEFAULT_WINDOW_CONFIG: ResolvedWindowConfig;
|
|
116
116
|
/**
|
|
117
|
-
*
|
|
117
|
+
* Resolve window configuration (merge with defaults)
|
|
118
118
|
*
|
|
119
|
-
* embedded: true
|
|
119
|
+
* embedded: true overrides interaction-related settings.
|
|
120
120
|
*/
|
|
121
121
|
export declare function resolveWindowConfig(config?: WindowConfig): ResolvedWindowConfig;
|
|
122
122
|
//# sourceMappingURL=window-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window-config.d.ts","sourceRoot":"","sources":["../../src/types/window-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAErF,MAAM,WAAW,cAAc;IAC3B,
|
|
1
|
+
{"version":3,"file":"window-config.d.ts","sourceRoot":"","sources":["../../src/types/window-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAErF,MAAM,WAAW,cAAc;IAC3B,oEAAoE;IACpE,MAAM,EAAE,YAAY,CAAC;IACrB,yEAAyE;IACzE,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAGzB,0BAA0B;IAC1B,WAAW,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;IAEnD,uDAAuD;IACvD,eAAe,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAE3C,mDAAmD;IACnD,WAAW,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAIhD,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CA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4
|
+
* Provides cross-browser compatible clipboard copy functionality.
|
|
5
|
+
* Prefers navigator.clipboard API, falls back to execCommand.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Copy text to clipboard
|
|
9
9
|
*
|
|
10
|
-
* @param text
|
|
11
|
-
* @returns
|
|
10
|
+
* @param text Text to copy
|
|
11
|
+
* @returns Whether the copy was successful
|
|
12
12
|
*/
|
|
13
13
|
export declare function copyToClipboard(text: string): Promise<boolean>;
|
|
14
14
|
//# sourceMappingURL=clipboard.d.ts.map
|
|
@@ -13,21 +13,21 @@
|
|
|
13
13
|
* "/ " → { isCommand: false }
|
|
14
14
|
*/
|
|
15
15
|
export interface ParsedCommand {
|
|
16
|
-
/**
|
|
16
|
+
/** Whether the input is a command */
|
|
17
17
|
isCommand: boolean;
|
|
18
|
-
/**
|
|
18
|
+
/** Command name (without the '/' prefix) */
|
|
19
19
|
name?: string;
|
|
20
|
-
/**
|
|
20
|
+
/** Command arguments (remaining content after command name, trimmed) */
|
|
21
21
|
args?: string;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Parse user input to determine if it's a slash command
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
* 1.
|
|
28
|
-
* 2. '/'
|
|
29
|
-
* 3.
|
|
30
|
-
* 4.
|
|
26
|
+
* Parsing rules:
|
|
27
|
+
* 1. Input must start with '/'
|
|
28
|
+
* 2. There must be at least one non-whitespace character after '/' as the command name
|
|
29
|
+
* 3. The command name consists of consecutive non-whitespace characters (up to the first space)
|
|
30
|
+
* 4. Content after the command name is treated as arguments (passed after trimming)
|
|
31
31
|
*/
|
|
32
32
|
export declare function parseCommand(input: string): ParsedCommand;
|
|
33
33
|
//# sourceMappingURL=command-parser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-parser.d.ts","sourceRoot":"","sources":["../../src/utils/command-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,aAAa;IAC1B,
|
|
1
|
+
{"version":3,"file":"command-parser.d.ts","sourceRoot":"","sources":["../../src/utils/command-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,aAAa;IAC1B,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAwCzD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Highlight.js
|
|
2
|
+
* Highlight.js on-demand loading configuration
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Only registers commonly used languages, significantly reducing bundle size (from 9.2MB to ~1MB).
|
|
5
|
+
* Covers common RTC Agent code scenarios: TypeScript/JavaScript/Python/Go/JSON/YAML/Bash, etc.
|
|
6
6
|
*/
|
|
7
7
|
import hljs from 'highlight.js/lib/core';
|
|
8
8
|
export default hljs;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Relative time formatting utilities
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Uses native Intl.RelativeTimeFormat, no third-party library needed.
|
|
5
|
+
* Supports Chinese and English, automatically selects the best unit (seconds/minutes/hours/days/weeks/months/years).
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @param timestamp
|
|
10
|
-
* @param locale
|
|
11
|
-
* @returns
|
|
8
|
+
* Format a timestamp as relative time
|
|
9
|
+
* @param timestamp Millisecond timestamp
|
|
10
|
+
* @param locale Locale, defaults to Chinese
|
|
11
|
+
* @returns Relative time string, e.g. "3 minutes ago", "2 hours ago", "5 days ago"
|
|
12
12
|
*/
|
|
13
13
|
export declare function formatRelativeTime(timestamp: number, locale?: 'zh-CN' | 'en-US'): string;
|
|
14
14
|
//# sourceMappingURL=relative-time.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Export to HTML
|
|
3
|
+
*
|
|
4
|
+
* Exports current session conversation to a static HTML file for offline
|
|
5
|
+
* reading, archiving, and sharing. Pure frontend implementation.
|
|
6
|
+
*/
|
|
7
|
+
import type { Session, Message } from '../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Generate a safe filename from session title and creation date.
|
|
10
|
+
*
|
|
11
|
+
* Format: `rtc-{sanitized-title}-{YYYY-MM-DD}.html`
|
|
12
|
+
* - Replaces illegal filename characters with hyphens
|
|
13
|
+
* - Replaces spaces with hyphens
|
|
14
|
+
* - Truncates title to 50 characters
|
|
15
|
+
*/
|
|
16
|
+
export declare function generateFilename(session: Session): string;
|
|
17
|
+
/**
|
|
18
|
+
* Determine if a message should be expanded (shown inline) or collapsed.
|
|
19
|
+
*
|
|
20
|
+
* Expanded: user messages, assistant markdown messages
|
|
21
|
+
* Collapsed: tool calls, thinking, errors, prompts, summaries
|
|
22
|
+
*/
|
|
23
|
+
export declare function shouldExpand(message: Message): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Render message content to sanitized HTML.
|
|
26
|
+
*
|
|
27
|
+
* - user_message: extract text, render as Markdown → sanitize
|
|
28
|
+
* - markdown: render as Markdown → sanitize
|
|
29
|
+
* - text: escape HTML, render as plain text
|
|
30
|
+
* - toolcall_input/toolcall_output: parse tool data, render as formatted JSON
|
|
31
|
+
* - other types: render as JSON or escaped text in <pre><code>
|
|
32
|
+
*
|
|
33
|
+
* Markdown rendering uses the same pipeline as rtc-message.ts:
|
|
34
|
+
* marked.parse() → highlight.js → DOMPurify.sanitize()
|
|
35
|
+
*
|
|
36
|
+
* Tool call data may be an object or a JSON string (double-serialized).
|
|
37
|
+
* Field name is `tool_name` (not `name`). See rtc-toolcall-card.ts:53-91.
|
|
38
|
+
*/
|
|
39
|
+
export declare function renderMessageContent(message: Message): Promise<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Generate preview text for collapsed messages.
|
|
42
|
+
*
|
|
43
|
+
* Provides a short, meaningful label for each content type.
|
|
44
|
+
* Tool call field name is `tool_name` (see rtc-toolcall-card.ts:53-91).
|
|
45
|
+
* Uses shared parseContentData() for uniform JSON string/object handling.
|
|
46
|
+
*/
|
|
47
|
+
export declare function getPreviewText(message: Message): string;
|
|
48
|
+
/**
|
|
49
|
+
* Generate complete HTML document for session export.
|
|
50
|
+
*
|
|
51
|
+
* Async because renderMessageContent requires lazy-loaded marked/DOMPurify.
|
|
52
|
+
*/
|
|
53
|
+
export declare function generateSessionHTML(session: Session, messages: Message[]): Promise<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Trigger browser download of HTML content.
|
|
56
|
+
*/
|
|
57
|
+
export declare function triggerDownload(html: string, filename: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Export session to HTML file.
|
|
60
|
+
*
|
|
61
|
+
* Main entry point: generates HTML and triggers download.
|
|
62
|
+
* Async because generateSessionHTML requires lazy-loaded marked/DOMPurify.
|
|
63
|
+
*/
|
|
64
|
+
export declare function exportSession(session: Session, messages: Message[]): Promise<void>;
|
|
65
|
+
//# sourceMappingURL=session-exporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-exporter.d.ts","sourceRoot":"","sources":["../../src/utils/session-exporter.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CASzD;AA6ED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAKtD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CA0D5E;AAsCD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CA4BvD;AAkCD;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAoXhG;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAQpE;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxF"}
|