@blueking/chat-x 0.0.1-beta.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.
Files changed (80) hide show
  1. package/dist/ag-ui/types/constants.d.ts +34 -0
  2. package/dist/ag-ui/types/contents.d.ts +45 -0
  3. package/dist/ag-ui/types/index.d.ts +3 -0
  4. package/dist/ag-ui/types/messages.d.ts +27 -0
  5. package/dist/common/constants.d.ts +20 -0
  6. package/dist/common/icon.d.ts +14 -0
  7. package/dist/common/index.d.ts +4 -0
  8. package/dist/common/lang.d.ts +1 -0
  9. package/dist/common/shortcut.d.ts +2 -0
  10. package/dist/components/ai-selection/ai-selection.vue.d.ts +39 -0
  11. package/dist/components/ai-shortcut/shortcut-btn.vue.d.ts +24 -0
  12. package/dist/components/ai-shortcut/shortcut-btns.vue.d.ts +12 -0
  13. package/dist/components/ai-shortcut/shortcut-render.vue.d.ts +10 -0
  14. package/dist/components/chat-content/common-error-content.vue.d.ts +18 -0
  15. package/dist/components/chat-content/content-render.vue.d.ts +24 -0
  16. package/dist/components/chat-content/markdown-content.vue.d.ts +5 -0
  17. package/dist/components/chat-content/reference-content.vue.d.ts +13 -0
  18. package/dist/components/chat-content/text-content.vue.d.ts +4 -0
  19. package/dist/components/chat-content/think-content.vue.d.ts +13 -0
  20. package/dist/components/chat-input/ai-slash-editor/ai-slash-editor.vue.d.ts +28 -0
  21. package/dist/components/chat-input/ai-slash-editor/theme.d.ts +24 -0
  22. package/dist/components/chat-input/ai-slash-input/ai-prompt-list.vue.d.ts +7 -0
  23. package/dist/components/chat-input/ai-slash-input/ai-slash-input.vue.d.ts +47 -0
  24. package/dist/components/chat-input/ai-slash-input/ai-slash-menu.vue.d.ts +8 -0
  25. package/dist/components/chat-input/ai-slash-input/command.d.ts +6 -0
  26. package/dist/components/chat-input/ai-slash-input/constants.d.ts +11 -0
  27. package/dist/components/chat-input/chat-input.vue.d.ts +55 -0
  28. package/dist/components/chat-input/input-attachment/input-attachment.vue.d.ts +23 -0
  29. package/dist/components/chat-message/assistant-message.vue.d.ts +18 -0
  30. package/dist/components/chat-message/info-message.vue.d.ts +4 -0
  31. package/dist/components/chat-message/message-render.vue.d.ts +16 -0
  32. package/dist/components/chat-message/user-message.vue.d.ts +4 -0
  33. package/dist/components/index.d.ts +9 -0
  34. package/dist/components/message-tools/message-tools.vue.d.ts +7 -0
  35. package/dist/components/message-tools/tool-btn.vue.d.ts +8 -0
  36. package/dist/composables/index.d.ts +4 -0
  37. package/dist/composables/use-command-selection.d.ts +11 -0
  38. package/dist/composables/use-global-config.d.ts +11 -0
  39. package/dist/composables/use-menu-keydown.d.ts +8 -0
  40. package/dist/composables/use-observer-visible-list.d.ts +9 -0
  41. package/dist/directives/index.d.ts +1 -0
  42. package/dist/directives/overflow-tips.d.ts +15 -0
  43. package/dist/edix/commands.d.ts +6 -0
  44. package/dist/edix/doc/edit.d.ts +55 -0
  45. package/dist/edix/doc/position.d.ts +19 -0
  46. package/dist/edix/doc/types.d.ts +15 -0
  47. package/dist/edix/doc/utils.d.ts +9 -0
  48. package/dist/edix/dom/default.d.ts +4 -0
  49. package/dist/edix/dom/index.d.ts +42 -0
  50. package/dist/edix/dom/parser.d.ts +63 -0
  51. package/dist/edix/editor.d.ts +55 -0
  52. package/dist/edix/history.d.ts +10 -0
  53. package/dist/edix/index.d.ts +6 -0
  54. package/dist/edix/mutation.d.ts +8 -0
  55. package/dist/edix/plugins/singleline.d.ts +5 -0
  56. package/dist/edix/schema/index.d.ts +3 -0
  57. package/dist/edix/schema/plain.d.ts +7 -0
  58. package/dist/edix/schema/structured.d.ts +35 -0
  59. package/dist/edix/schema/types.d.ts +13 -0
  60. package/dist/edix/utils.d.ts +8 -0
  61. package/dist/icons/ai.d.ts +3 -0
  62. package/dist/icons/content.d.ts +15 -0
  63. package/dist/icons/index.d.ts +5 -0
  64. package/dist/icons/messages.d.ts +30 -0
  65. package/dist/icons/shortcuts.d.ts +6 -0
  66. package/dist/icons/tools.d.ts +45 -0
  67. package/dist/index.css +2 -0
  68. package/dist/index.d.ts +10 -0
  69. package/dist/index.js +8428 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/lang/lang.d.ts +17 -0
  72. package/dist/types/editor.d.ts +20 -0
  73. package/dist/types/index.d.ts +4 -0
  74. package/dist/types/input.d.ts +18 -0
  75. package/dist/types/shortcut.d.ts +40 -0
  76. package/dist/types/tool.d.ts +6 -0
  77. package/dist/utils/index.d.ts +1 -0
  78. package/dist/utils/utils.d.ts +1 -0
  79. package/package.json +46 -0
  80. package/readme.md +0 -0
@@ -0,0 +1,17 @@
1
+ export declare const lang: {
2
+ readonly 发送: "Send";
3
+ readonly 停止: "Stop";
4
+ readonly 问问小鲸: "Ask AI";
5
+ readonly 复制: "Copy";
6
+ readonly 分享: "Share";
7
+ readonly 点赞: "Like";
8
+ readonly 不满意: "Unsatisfied";
9
+ readonly 删除: "Delete";
10
+ readonly 引用: "Quote";
11
+ readonly 重新生成: "Regenerate";
12
+ readonly 提交: "Submit";
13
+ readonly 取消: "Cancel";
14
+ readonly 预览内容: "Preview Content";
15
+ readonly 跳转详情: "Jump to Detail";
16
+ };
17
+ export declare const t: (key: keyof typeof lang) => "Cancel" | "Copy" | "Submit" | "Send" | "Stop" | "Ask AI" | "Share" | "Like" | "Unsatisfied" | "Delete" | "Quote" | "Regenerate" | "Preview Content" | "Jump to Detail" | "发送" | "停止" | "问问小鲸" | "复制" | "分享" | "点赞" | "不满意" | "删除" | "引用" | "重新生成" | "提交" | "取消" | "预览内容" | "跳转详情";
@@ -0,0 +1,20 @@
1
+ export interface IAiSlashGroupItem {
2
+ isExpand: boolean;
3
+ items: IAiSlashMenuItem[];
4
+ name: string;
5
+ type: keyof typeof resourceTypeMap;
6
+ }
7
+ export interface IAiSlashMenuItem {
8
+ icon: string;
9
+ id: string;
10
+ name: string;
11
+ type: keyof typeof resourceTypeMap;
12
+ }
13
+ export declare const resourceTypeMap: {
14
+ readonly tool: "工具";
15
+ readonly mcp: "MCP";
16
+ readonly doc: "知识库";
17
+ readonly shortcut: "快捷指令";
18
+ };
19
+ export type ResourceType = keyof typeof resourceTypeMap;
20
+ export declare const noop: () => void;
@@ -0,0 +1,4 @@
1
+ export * from './editor';
2
+ export * from './input';
3
+ export * from './shortcut';
4
+ export * from './tool';
@@ -0,0 +1,18 @@
1
+ import { type tagSchema } from '../components/chat-input/ai-slash-input/constants';
2
+ import type { InferDoc } from '../edix';
3
+ export declare const MessageState: {
4
+ readonly ACTIVE: "active";
5
+ readonly DISABLED: "disabled";
6
+ readonly LOADING: "loading";
7
+ };
8
+ export type MentionState = {
9
+ coordinates: null | {
10
+ height: number;
11
+ left: number;
12
+ top: number;
13
+ };
14
+ isActive?: boolean;
15
+ query?: string;
16
+ rect: DOMRect | null;
17
+ };
18
+ export type TagSchema = InferDoc<typeof tagSchema>;
@@ -0,0 +1,40 @@
1
+ import type { Component, h, VNode } from 'vue';
2
+ import { type Checkbox, type Form, type Input, type Radio, type Select, type Switcher } from 'bkui-vue';
3
+ export type BaseShortcutComponent<T extends keyof ShortcutComponentProps> = {
4
+ formItemProps: InstanceType<typeof Form.FormItem>['$props'];
5
+ props: ShortcutComponentProps[T];
6
+ type: T;
7
+ };
8
+ export interface CheckboxGroupShortcutComponent extends BaseShortcutComponent<'checkboxGroup'> {
9
+ props: InstanceType<typeof Checkbox.Group>['$props'] & {
10
+ options: InstanceType<typeof Checkbox>['$props'][];
11
+ };
12
+ }
13
+ export type InputShortcutComponent = BaseShortcutComponent<'input'>;
14
+ export interface RadioGroupShortcutComponent extends BaseShortcutComponent<'radioGroup'> {
15
+ props: InstanceType<typeof Radio.Group>['$props'] & {
16
+ options: InstanceType<typeof Radio>['$props'][];
17
+ };
18
+ }
19
+ export interface SelectShortcutComponent extends BaseShortcutComponent<'select'> {
20
+ props: InstanceType<typeof Select>['$props'] & {
21
+ options: InstanceType<typeof Select.Option>['$props'][];
22
+ };
23
+ }
24
+ export interface Shortcut {
25
+ components?: ShortcutComponent[];
26
+ description?: string;
27
+ formModel?: Record<string, unknown>;
28
+ icon?: ((c: typeof h) => Component | VNode) | string | VNode;
29
+ id: string;
30
+ name: string;
31
+ }
32
+ export type ShortcutComponent = CheckboxGroupShortcutComponent | InputShortcutComponent | RadioGroupShortcutComponent | SelectShortcutComponent | SwitcherShortcutComponent;
33
+ export type ShortcutComponentProps = {
34
+ checkboxGroup: InstanceType<typeof Checkbox.Group>['$props'];
35
+ input: InstanceType<typeof Input>['$props'];
36
+ radioGroup: InstanceType<typeof Radio.Group>['$props'];
37
+ select: InstanceType<typeof Select>['$props'];
38
+ switcher: InstanceType<typeof Switcher>['$props'];
39
+ };
40
+ export type SwitcherShortcutComponent = BaseShortcutComponent<'switcher'>;
@@ -0,0 +1,6 @@
1
+ import { type ToolIconsMap } from '../icons/tools';
2
+ export interface IToolBtn {
3
+ description: string;
4
+ id: keyof typeof ToolIconsMap;
5
+ name: string;
6
+ }
@@ -0,0 +1 @@
1
+ export * from './utils';
@@ -0,0 +1 @@
1
+ export declare const getCookieByName: (name: string) => string | null | undefined;
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@blueking/chat-x",
3
+ "version": "0.0.1-beta.1",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "dev": "vite --config vite.config.ts",
8
+ "dts": "vue-tsc --project tsconfig.dts.json",
9
+ "build": "pnpm dts && vite --config vite.config.ts build",
10
+ "preview": "vite preview",
11
+ "lint:script": "eslint . --ext .vue,.ts --fix",
12
+ "lint:style": "stylelint \"**/*.{scss,css,vue}\" --fix",
13
+ "lint:all": "pnpm lint:script && pnpm lint:style"
14
+ },
15
+ "module": "dist/index.js",
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "registry": "https://registry.npmjs.org/"
19
+ },
20
+ "types": "dist/index.d.ts",
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "keywords": [],
25
+ "author": "",
26
+ "license": "ISC",
27
+ "dependencies": {
28
+ "bkui-vue": "^2.0.1",
29
+ "vue": "^3.5.24"
30
+ },
31
+ "devDependencies": {
32
+ "@types/markdown-it": "^14.1.2",
33
+ "@vitejs/plugin-vue": "^6.0.1",
34
+ "@vue/tsconfig": "^0.8.1",
35
+ "github-markdown-css": "^5.8.1",
36
+ "less": "^4.4.2",
37
+ "markdown-it": "^14.1.0",
38
+ "monaco-editor": "^0.55.1",
39
+ "sass-embedded": "^1.93.3",
40
+ "vite": "npm:rolldown-vite@7.2.5",
41
+ "vite-bundle-analyzer": "^1.3.2",
42
+ "vite-plugin-dts": "^4.5.4",
43
+ "vue-tippy": "^6.7.1",
44
+ "vue-tsc": "^3.1.4"
45
+ }
46
+ }
package/readme.md ADDED
File without changes