@farris/x-ui 0.2.9 → 0.3.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.
@@ -2,6 +2,7 @@ import { Plugin } from '../../vue';
2
2
  import { default as FXAgentThinking } from '../../src/agent-thinking.component';
3
3
 
4
4
  export * from '../../src/types';
5
+ export * from '../../src/agent-thinking.props';
5
6
  export { FXAgentThinking };
6
7
  declare const _default: typeof FXAgentThinking & Plugin;
7
8
  export default _default;
@@ -1,15 +1,23 @@
1
- import { PropType } from '../../../vue';
2
- import { MessageContentAgentThinking } from '../../../types';
3
1
 
4
2
  declare const _default: import('../../../vue').DefineComponent<import('../../../vue').ExtractPropTypes<{
5
3
  content: {
6
- type: PropType<MessageContentAgentThinking>;
7
- required: true;
4
+ type: import('../../../vue').PropType<import('../../../types').MessageContentAgentThinking>;
5
+ required: boolean;
8
6
  };
9
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<import('../../../vue').ExtractPropTypes<{
7
+ defaultExpanded: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<import('../../../vue').ExtractPropTypes<{
10
12
  content: {
11
- type: PropType<MessageContentAgentThinking>;
12
- required: true;
13
+ type: import('../../../vue').PropType<import('../../../types').MessageContentAgentThinking>;
14
+ required: boolean;
15
+ };
16
+ defaultExpanded: {
17
+ type: BooleanConstructor;
18
+ default: boolean;
13
19
  };
14
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
20
+ }>> & Readonly<{}>, {
21
+ defaultExpanded: boolean;
22
+ }, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
15
23
  export default _default;
@@ -0,0 +1,15 @@
1
+ import { ExtractPropTypes, PropType } from '../../../vue';
2
+ import { MessageContentAgentThinking } from '../../../types';
3
+
4
+ export declare const agentThinkingProps: {
5
+ content: {
6
+ type: PropType<MessageContentAgentThinking>;
7
+ required: boolean;
8
+ };
9
+ /** 为 false 时根级默认收折;独立消息场景保持 true */
10
+ defaultExpanded: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ };
15
+ export type AgentThinkingProps = ExtractPropTypes<typeof agentThinkingProps>;
@@ -1,7 +1,16 @@
1
+ /** 单条思考步骤:摘要 + 可展开详情 */
2
+ export interface AgentThinkingStep {
3
+ summary: string;
4
+ detail?: string;
5
+ }
1
6
  export interface MessageContentAgentThinking {
2
7
  type: 'AgentThinking';
3
8
  standardType?: 'agent/thinking';
4
9
  streamStatus?: 'start' | 'continue' | 'end';
10
+ /** 顶栏标题;进行中默认「正在思考...」,完成后默认「思考完成」 */
11
+ title?: string;
12
+ /** 无 steps 时直接在顶栏下展示的正文 */
5
13
  text: string;
14
+ steps?: AgentThinkingStep[];
6
15
  sources?: string[];
7
16
  }
@@ -1,6 +1,6 @@
1
1
  import { ExtractPropTypes, PropType } from '../../../../../vue';
2
2
  import { ThinkContent } from '../../../../../../../composition/types';
3
- import { OutputMode } from '../../../../../../../..';
3
+ import { OutputMode } from '../../../../../../../../../common';
4
4
 
5
5
  export declare const bubbleThinkProps: {
6
6
  /** 思考内容 */
@@ -161,5 +161,9 @@ export interface Attachment {
161
161
  content?: string;
162
162
  /** 是否显示预览按钮 */
163
163
  showPreview?: boolean;
164
+ /** 生成时间戳 */
165
+ timestamp?: number;
166
+ /** 是否为生成状态*/
167
+ pending?: boolean;
164
168
  }
165
169
  export type AppearanceType = "root" | "header" | "content" | "footer";
@@ -1,5 +1,6 @@
1
1
  export default function useAttachment(): {
2
- getFileIcon: (type: string) => string;
2
+ getFileIcon: (type: string, prefix?: string) => string;
3
3
  formatFileName: (name: string) => string;
4
4
  formatFileSize: (size: number) => string;
5
+ formatFileTime: (timestamp: number) => string;
5
6
  };
@@ -2,6 +2,6 @@ import { Plugin } from '../../vue';
2
2
  import { default as FXDynamicComponent } from '../../src/dynamic-component.component';
3
3
  export { default as FXDynamicComponent } from '../../src/dynamic-component.component';
4
4
  export * from '../../src/composition/types';
5
- export { loadDynamicComponent, unloadDynamicComponent, postDynamicComponentAssistantMessage, peekDynamicComponentRegisterBootstrapId, normalizeDynamicComponentRegisterClaim, getDynamicComponentRegistryDebugSnapshot } from '../../src/composition/dynamic-component-registry';
5
+ export { loadDynamicComponent, unloadDynamicComponent, postDynamicComponentAssistantMessage, getDynamicCompState, peekDynamicComponentRegisterBootstrapId, normalizeDynamicComponentRegisterClaim, getDynamicComponentRegistryDebugSnapshot } from '../../src/composition/dynamic-component-registry';
6
6
  declare const _default: typeof FXDynamicComponent & Plugin;
7
7
  export default _default;
@@ -1,4 +1,4 @@
1
- import { DynamicComponentConfig, DynamicComponentAPI, DynamicComponentAssistantMessagePayload } from '../../../../types';
1
+ import { DynamicComponentConfig, DynamicComponentAPI, DynamicComponentInstance, DynamicComponentAssistantMessagePayload } from '../../../../types';
2
2
 
3
3
  /** 与对话 mock 「口令规范化」同源:隐蔽字符会导致 pending key 肉眼一致却 get 失败 */
4
4
  export declare function normalizeDynamicComponentRegisterClaim(raw: unknown): string;
@@ -11,6 +11,8 @@ export declare function getDynamicComponentRegistryDebugSnapshot(): {
11
11
  activeKeys: string[];
12
12
  windowBootstrapPeek?: string;
13
13
  };
14
+ /** 按 instanceId 查询已 register 的 DC 实例(精确 id 匹配,不做 componentId 别名兜底) */
15
+ export declare function getDynamicCompState(instanceId: string): DynamicComponentInstance | null;
14
16
  export declare function loadDynamicComponent(config: DynamicComponentConfig): Promise<DynamicComponentAPI>;
15
17
  export declare function unloadDynamicComponent(id: string): void;
16
18
  export declare function postDynamicComponentAssistantMessage(id: string, payload: DynamicComponentAssistantMessagePayload): boolean;