@farris/x-ui 0.2.9 → 0.3.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.
@@ -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;