netstar-ai-chat 1.1.2 → 1.1.4

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.
@@ -4,7 +4,16 @@ declare function loadConversations(): Promise<void>;
4
4
  declare function getCurrentAgentRuntime(): AgentRuntime | undefined;
5
5
  declare function getCurrentAgentKey(): string;
6
6
  declare function handleNewChat(): void;
7
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
7
+ declare function handleConversationSelect(id: string): Promise<void>;
8
+ declare function __VLS_template(): {
9
+ "header-actions"?(_: {
10
+ handleReset: () => void;
11
+ }): any;
12
+ message?(_: {
13
+ item: import('ant-design-x-vue').BubbleListProps["items"][number];
14
+ }): any;
15
+ };
16
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
8
17
  /** 当前选中 Agent 的 key(v-model:agentKey) */
9
18
  agentKey?: string;
10
19
  /** 可用 Agent 列表,至少传一个 */
@@ -40,6 +49,69 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
40
49
  getCurrentAgentRuntime: typeof getCurrentAgentRuntime;
41
50
  /** 获取当前激活 Agent 的 key */
42
51
  getCurrentAgentKey: typeof getCurrentAgentKey;
52
+ /** 获取当前激活的会话 ID */
53
+ getActiveConversationId: () => string;
54
+ /** 获取当前已加载的历史消息 */
55
+ getHistoryMessages: () => {
56
+ content: string;
57
+ key: string;
58
+ loading?: boolean | undefined;
59
+ role: import('./AIMessage').ChatRole;
60
+ segments?: ({
61
+ end: number;
62
+ start: number;
63
+ type: "text";
64
+ } | {
65
+ toolCallId: string;
66
+ type: "tool";
67
+ } | {
68
+ attachments: {
69
+ id: string;
70
+ name: string;
71
+ size: number;
72
+ type: string;
73
+ url?: string | undefined;
74
+ }[];
75
+ type: "attachment";
76
+ })[] | undefined;
77
+ toolTimeline?: {
78
+ approvalConfig?: {
79
+ allowedDecisions: import('./LangchainMessage').DecisionType[];
80
+ args: Record<string, unknown>;
81
+ description: string;
82
+ editContent: string;
83
+ interruptId: string;
84
+ } | undefined;
85
+ durationMs?: number | undefined;
86
+ error?: string | undefined;
87
+ input?: unknown;
88
+ inputPreview?: string | undefined;
89
+ output?: unknown;
90
+ resultPreview?: string | undefined;
91
+ startedAt: number;
92
+ status: import('./AIMessage').ToolCallStatus;
93
+ stepNumber?: number | undefined;
94
+ title?: string | undefined;
95
+ toolCallId: string;
96
+ toolName: string;
97
+ }[] | undefined;
98
+ }[];
99
+ /** 获取当前会话列表 */
100
+ getConversations: () => {
101
+ createdAt?: number | undefined;
102
+ id: string;
103
+ title: string;
104
+ updatedAt?: number | undefined;
105
+ }[];
106
+ /**
107
+ * 编程式加载指定会话的历史消息并切换到该会话。
108
+ * @param conversationId - 会话 ID
109
+ */
110
+ loadConversation: typeof handleConversationSelect;
111
+ /** 向 ChatPanel 发送消息 */
112
+ sendMessage: (text?: string) => Promise<void> | undefined;
113
+ /** 停止当前 ChatPanel 的生成 */
114
+ stop: () => void | undefined;
43
115
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
44
116
  "update:agentKey": (key: string) => void;
45
117
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -76,6 +148,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
76
148
  agentKey: string;
77
149
  emptyHint: string;
78
150
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
151
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
79
152
  export default _default;
80
153
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
81
154
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -94,3 +167,8 @@ type __VLS_WithDefaults<P, D> = {
94
167
  type __VLS_Prettify<T> = {
95
168
  [K in keyof T]: T[K];
96
169
  } & {};
170
+ type __VLS_WithTemplateSlots<T, S> = T & {
171
+ new (): {
172
+ $slots: S;
173
+ };
174
+ };
@@ -38,8 +38,12 @@ interface Props {
38
38
  /** 标题 */
39
39
  title?: string;
40
40
  }
41
+ declare function sendMessage(value?: string): Promise<void>;
42
+ declare function handleReset(): void;
41
43
  declare function __VLS_template(): {
42
- "header-actions"?(_: {}): any;
44
+ "header-actions"?(_: {
45
+ handleReset: typeof handleReset;
46
+ }): any;
43
47
  message?(_: {
44
48
  item: import('ant-design-x-vue').BubbleListProps["items"][number];
45
49
  }): any;
@@ -54,7 +58,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
54
58
  sessionKey: string;
55
59
  initialMessages: () => never[];
56
60
  defaultToolRenderers: () => ToolRendererMap;
57
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
61
+ }>>, {
62
+ handleReset: typeof handleReset;
63
+ sendMessage: typeof sendMessage;
64
+ stop: typeof stop;
65
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
58
66
  "update:modelValue": (value: string) => void;
59
67
  "update:agentKey": (value: string) => void;
60
68
  submit: (value?: string | undefined, agentKey?: string | undefined) => void;