@blueking/chat-x 0.0.49-beta.7 → 0.0.50

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.
Files changed (25) hide show
  1. package/dist/ag-ui/types/file.d.ts +1 -11
  2. package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/artifact-preview-host.vue.d.ts +5 -1
  3. package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/preview-strategy.d.ts +4 -5
  4. package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/renderers/code-preview.vue.d.ts +8 -0
  5. package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/renderers/image-preview.vue.d.ts +7 -0
  6. package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/use-artifact-preview-loader.d.ts +1 -0
  7. package/dist/components/chat-message/assistant-message/message-artifacts/file-artifact-panel.vue.d.ts +1 -0
  8. package/dist/components/file-icon/file-icon.vue.d.ts +7 -0
  9. package/dist/components/index.d.ts +2 -1
  10. package/dist/composables/use-message-group.d.ts +72 -72
  11. package/dist/icons/file-icons.d.ts +4 -0
  12. package/dist/icons/file.d.ts +0 -18
  13. package/dist/icons/index.d.ts +1 -0
  14. package/dist/index.css +1 -1
  15. package/dist/index.js +2122 -1952
  16. package/dist/index.js.map +1 -1
  17. package/dist/mcp/generated/docs/assistant-message.md +12 -8
  18. package/dist/mcp/generated/docs/file-artifact-panel.md +27 -11
  19. package/dist/mcp/generated/docs/file-icon.md +111 -0
  20. package/dist/mcp/generated/index.json +22 -2
  21. package/dist/mcp/index.js +0 -0
  22. package/dist/utils/file-type.d.ts +14 -0
  23. package/dist/utils/index.d.ts +1 -0
  24. package/package.json +21 -20
  25. package/dist/components/chat-message/assistant-message/message-artifacts/file-icon.d.ts +0 -29
@@ -1,18 +1,8 @@
1
- export declare enum AIFileType {
2
- Html = "html",
3
- Jpg = "jpg",
4
- Json = "json",
5
- Markdown = "markdown",
6
- /** 后台扩展名别名,与 Markdown 等价 */
7
- Md = "md",
8
- Pdf = "pdf",
9
- Txt = "txt"
10
- }
11
1
  export type AIFileInfo = {
12
2
  name: string;
13
3
  outputId: string;
14
4
  size: number;
15
- type: AIFileType;
5
+ type: string;
16
6
  };
17
7
  /** 点击文件产物后异步获取的下载 / 预览地址(snake_case) */
18
8
  export type ArtifactUrlResult = {
@@ -2,6 +2,10 @@ import type { AIFileInfo } from '../../../../../ag-ui/types/file';
2
2
  type __VLS_Props = {
3
3
  file?: AIFileInfo;
4
4
  };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
6
+ content: import("vue").ShallowRef<string, string>;
7
+ renderer: import("vue").ShallowRef<import("./preview-strategy.ts").ArtifactPreviewRendererKind, import("./preview-strategy.ts").ArtifactPreviewRendererKind>;
8
+ status: import("vue").ShallowRef<import("./use-artifact-preview-loader").ArtifactPreviewStatus, import("./use-artifact-preview-loader").ArtifactPreviewStatus>;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
10
  declare const _default: typeof __VLS_export;
7
11
  export default _default;
@@ -1,9 +1,8 @@
1
- import { AIFileType } from '../../../../../ag-ui/types/file';
2
- export type ArtifactPreviewLoadStrategy = 'preview_url_iframe' | 'text_from_download';
3
- export type ArtifactPreviewRendererKind = 'html' | 'markdown' | 'txt' | 'urlIframe';
1
+ export type ArtifactPreviewLoadStrategy = 'preview_url' | 'text_from_download';
2
+ export type ArtifactPreviewRendererKind = 'code' | 'html' | 'image' | 'markdown' | 'txt' | 'urlIframe';
4
3
  export type ArtifactPreviewStrategy = {
5
4
  load: ArtifactPreviewLoadStrategy;
6
5
  renderer: ArtifactPreviewRendererKind;
7
6
  };
8
- /** 按文件类型解析预览加载策略与渲染器;未单独注册的类型默认 preview_url iframe */
9
- export declare const getArtifactPreviewStrategy: (type: AIFileType) => ArtifactPreviewStrategy;
7
+ /** 按文件类型解析预览加载策略与渲染器;未登记的类型默认 preview_url iframe */
8
+ export declare const getArtifactPreviewStrategy: (type?: string, name?: string) => ArtifactPreviewStrategy;
@@ -0,0 +1,8 @@
1
+ import 'highlight.js/styles/github-dark.css';
2
+ type __VLS_Props = {
3
+ content: string;
4
+ extension: string;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ name?: string;
3
+ url: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -14,6 +14,7 @@ export declare const useArtifactPreviewLoader: (options: {
14
14
  }) => {
15
15
  content: import("vue").ShallowRef<string, string>;
16
16
  dispose: () => void;
17
+ downloadUrl: import("vue").ShallowRef<string, string>;
17
18
  load: () => Promise<void>;
18
19
  previewUrl: import("vue").ShallowRef<string, string>;
19
20
  renderer: import("vue").ShallowRef<ArtifactPreviewRendererKind, ArtifactPreviewRendererKind>;
@@ -1,4 +1,5 @@
1
1
  import type { SessionArtifact } from '../../../../composables/use-artifact-preview';
2
+ import 'tippy.js/dist/tippy.css';
2
3
  type __VLS_Props = {
3
4
  activeId: string;
4
5
  artifacts: SessionArtifact[];
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ fileName?: string;
3
+ fileType?: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -14,6 +14,7 @@ export type { IModelCapability, IModelOption, IModelProperty, ModelCapabilityThe
14
14
  import MessageContainer from './chat-message/message-container/message-container.vue';
15
15
  import MessageRender from './chat-message/message-render/message-render.vue';
16
16
  import ExecutionSummary from './execution-summary/execution-summary.vue';
17
+ import FileIcon from './file-icon/file-icon.vue';
17
18
  import HighlightKeyword from './highlight-keyword/highlight-keyword';
18
19
  import ImagePreviewGroup from './image-preview/image-preview-group.vue';
19
20
  import ImagePreview from './image-preview/image-preview.vue';
@@ -25,4 +26,4 @@ import SelectionFooter from './selection-footer/selection-footer.vue';
25
26
  import ToolCallRender from './tool-call/toolcall-render/toolcall-render.vue';
26
27
  export * from './chat-message/interrupt-message';
27
28
  export * from './markdown-token';
28
- export { AiImage, AiLoading, AiSelection, ChatContainer, ChatInput, commonErrorContent, ContentRender, ExecutionSummary, HighlightKeyword, ImagePreview, ImagePreviewGroup, MessageContainer, MessageLoading, MessageRender, MessageTools, MessageUserFeedback, ModelSelector, ScrollBtn, SelectionFooter, ShortcutBtn, ShortcutBtns, ShortcutRender, ToolCallRender, };
29
+ export { AiImage, AiLoading, AiSelection, ChatContainer, ChatInput, commonErrorContent, ContentRender, ExecutionSummary, FileIcon, HighlightKeyword, ImagePreview, ImagePreviewGroup, MessageContainer, MessageLoading, MessageRender, MessageTools, MessageUserFeedback, ModelSelector, ScrollBtn, SelectionFooter, ShortcutBtn, ShortcutBtns, ShortcutRender, ToolCallRender, };