{"_id":"@angineer/aichat-ui","_rev":"5-f16a0f5391e1760cc4e2eca896dba54b","name":"@angineer/aichat-ui","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.6":{"name":"@angineer/aichat-ui","version":"0.1.6","license":"MIT","_id":"@angineer/aichat-ui@0.1.6","maintainers":[{"name":"0mao0","email":"orangen@aliyun.com"}],"dist":{"shasum":"b094bf8a5be08a2b336f85f094b207ea25ecac9c","tarball":"https://registry.npmjs.org/@angineer/aichat-ui/-/aichat-ui-0.1.6.tgz","fileCount":27,"integrity":"sha512-XXxxvYnECIDkh5qIO0H2Fx2kShNA64O7DESa6Hy/nWzPp/7wZ/qM5y+b8lF9zbSsb904+m1gxsUsDI3L7aldlg==","signatures":[{"sig":"MEUCIG5BWTI4t/C4t9VXlDcuB6p1U9F3/KWnR655XYICmK+gAiEAhUxDjuRdfOMLYgE8uLRSy3YItqobufpF2pA2oxkjXA8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":178137},"main":"./src/index.ts","type":"module","types":"./src/index.ts","exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"},"./style":"./src/styles/index.less","./utils/citation":{"types":"./src/utils/citation.ts","import":"./src/utils/citation.ts"},"./utils/markdown":{"types":"./src/utils/markdown.ts","import":"./src/utils/markdown.ts"}},"scripts":{"test":"pnpm dlx tsx --test test/citation.test.ts test/searchSnippet.test.ts test/thinking.test.ts test/token.test.ts test/useAIChat.test.ts","typecheck":"vue-tsc --noEmit"},"_npmUser":{"name":"0mao0","email":"orangen@aliyun.com"},"_npmVersion":"11.4.2","description":"Vue 3 AI 对话组件库（基于 ant-design-vue + KaTeX）：流式对话、引用卡片（Citation）、思维链展示，以及 `useAIChat` Composable。","directories":{},"_nodeVersion":"24.3.0","dependencies":{"katex":"0.18.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"3.5.41","less":"^4.2.0","katex":"0.18.4","vue-tsc":"^2.0.6","typescript":"~5.4.0","ant-design-vue":"4.2.6","@ant-design/icons-vue":"7.0.1"},"peerDependencies":{"vue":"3.5.41","ant-design-vue":"4.2.6","@ant-design/icons-vue":"7.0.1"},"_npmOperationalInternal":{"tmp":"tmp/aichat-ui_0.1.6_1787835482737_0.5212605555248646","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@angineer/aichat-ui","version":"0.1.7","license":"MIT","_id":"@angineer/aichat-ui@0.1.7","maintainers":[{"name":"0mao0","email":"orangen@aliyun.com"}],"dist":{"shasum":"f62f567040862853c7d1c738a0664badd461cb6c","tarball":"https://registry.npmjs.org/@angineer/aichat-ui/-/aichat-ui-0.1.7.tgz","fileCount":27,"integrity":"sha512-KmoG2nO0bo2y5Zv6xPHJvNzOFVAOxeCwZrXeNpcrNzrQV2opDOktLWBtDxKl+0b6MVx6S0bLjkwB7PCZzHGfTw==","signatures":[{"sig":"MEUCIDuumuJfmootKrzI7GGzDoiN4k3eFw4BoSwxph0/YrGIAiEA8+gwBFdll//tIetEbill+g7g4kVTEDEPja8Ox4cwTN8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":178140},"main":"./src/index.ts","type":"module","types":"./src/index.ts","exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"},"./style":"./src/styles/index.less","./utils/citation":{"types":"./src/utils/citation.ts","import":"./src/utils/citation.ts"},"./utils/markdown":{"types":"./src/utils/markdown.ts","import":"./src/utils/markdown.ts"}},"scripts":{"test":"pnpm dlx tsx --test test/citation.test.ts test/searchSnippet.test.ts test/thinking.test.ts test/token.test.ts test/useAIChat.test.ts","typecheck":"vue-tsc --noEmit"},"_npmUser":{"name":"0mao0","email":"orangen@aliyun.com"},"_npmVersion":"11.4.2","description":"Vue 3 AI 对话组件库（基于 ant-design-vue + KaTeX）：流式对话、引用卡片（Citation）、思维链展示，以及 `useAIChat` Composable。","directories":{},"_nodeVersion":"24.3.0","dependencies":{"katex":"0.18.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"3.5.41","less":"^4.2.0","katex":"0.18.4","vue-tsc":"^2.0.6","typescript":"~5.4.0","ant-design-vue":"4.2.6","@ant-design/icons-vue":"7.0.1"},"peerDependencies":{"vue":"3.5.41","ant-design-vue":"4.2.6","@ant-design/icons-vue":"7.0.1"},"_npmOperationalInternal":{"tmp":"tmp/aichat-ui_0.1.7_1787835971968_0.7196112832051236","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@angineer/aichat-ui","version":"0.1.8","license":"MIT","_id":"@angineer/aichat-ui@0.1.8","maintainers":[{"name":"0mao0","email":"orangen@aliyun.com"}],"homepage":"https://github.com/0mao0/angineer-aichat-ui#readme","bugs":{"url":"https://github.com/0mao0/angineer-aichat-ui/issues"},"dist":{"shasum":"cb29508ce3ed3dfc51834cb2fc2fce91ca76fd5b","tarball":"https://registry.npmjs.org/@angineer/aichat-ui/-/aichat-ui-0.1.8.tgz","fileCount":27,"integrity":"sha512-B1EPsanozmmPtFSPCuDeryOTUJCg/267S+03vTOvx8oQAnfapjdvoKUp+SZAjPXCQW988PcxM+QOZXp9W+eoig==","signatures":[{"sig":"MEQCIHRg1PRlmtgbyIeMV/S588M9sI3czWXHISvBOW0Y6kmHAiA0J9bALPEiZRLUsqB9tubY6PBZqQE93i2aOcKPQ+9S7w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIChOtueCQlXJhKb0Qgui7xoiFbRZaw0oeu261ro8ywEDAiEA23gEdaftQeYkhnEi4q33hRUGsdX73EG4+wFgl+rUGXw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@angineer%2faichat-ui@0.1.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":192040},"main":"./src/index.ts","type":"module","types":"./src/index.ts","exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"},"./style":"./src/styles/index.less","./utils/citation":{"types":"./src/utils/citation.ts","import":"./src/utils/citation.ts"},"./utils/markdown":{"types":"./src/utils/markdown.ts","import":"./src/utils/markdown.ts"}},"gitHead":"c1f4b9829a301ab4b2217f76aadcefefbad49a66","scripts":{"test":"pnpm dlx tsx --test test/citation.test.ts test/searchSnippet.test.ts test/thinking.test.ts test/token.test.ts test/useAIChat.test.ts test/useAIChat.queue.test.ts","typecheck":"vue-tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:862c19de-1407-4981-a112-c43f88fe0fb5"}},"repository":{"url":"git+https://github.com/0mao0/angineer-aichat-ui.git","type":"git"},"_npmVersion":"11.19.0","description":"Vue 3 AI 对话组件库（基于 ant-design-vue + KaTeX）：流式对话、引用卡片（Citation）、思维链展示，以及 `useAIChat` Composable。","directories":{},"_nodeVersion":"24.20.0","dependencies":{"katex":"0.18.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"3.5.41","less":"^4.2.0","katex":"0.18.4","vue-tsc":"^2.0.6","typescript":"~5.4.0","ant-design-vue":"4.2.6","@ant-design/icons-vue":"7.0.1"},"peerDependencies":{"vue":"3.5.41","ant-design-vue":"4.2.6","@ant-design/icons-vue":"7.0.1"},"_npmOperationalInternal":{"tmp":"tmp/aichat-ui_0.1.8_1789053718931_0.8764305945629025","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"name":"@angineer/aichat-ui","version":"0.1.9","license":"MIT","_id":"@angineer/aichat-ui@0.1.9","maintainers":[{"name":"0mao0","email":"orangen@aliyun.com"}],"homepage":"https://github.com/0mao0/angineer-aichat-ui#readme","bugs":{"url":"https://github.com/0mao0/angineer-aichat-ui/issues"},"dist":{"shasum":"d8ef5ea9001ffbac3fe2aaf62db7a0c9543ec103","tarball":"https://registry.npmjs.org/@angineer/aichat-ui/-/aichat-ui-0.1.9.tgz","fileCount":27,"integrity":"sha512-hca+vMstm1qbrLqhS4h2b5xffvo8TKSK6hqPdWRSaiOlTfeVDEXFBz+DoitUHesryn6psfAknC9Xxichpoa8Pw==","signatures":[{"sig":"MEUCIQCGT9IHScg5FXdCTRuMO8IgBvi2t8+rAoHieMH2BdXSPQIgF4NyRiI3htr6yio5RXDMEmVrPFM6YCeMCbGZpfDNIxs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCtq7GY6eTmUGOglAd133NMjtKUa6laLi+5dumpfBYnuQIhAJQM5dGV12zW8pCeDMSvFiT5gYMnkfN5PISEEOKZB772","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@angineer%2faichat-ui@0.1.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":192100},"main":"./src/index.ts","type":"module","types":"./src/index.ts","exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"},"./style":"./src/styles/index.less","./utils/citation":{"types":"./src/utils/citation.ts","import":"./src/utils/citation.ts"},"./utils/markdown":{"types":"./src/utils/markdown.ts","import":"./src/utils/markdown.ts"}},"gitHead":"eb68caf66d71ec6800bb0500a2c19378607eba10","scripts":{"test":"pnpm dlx tsx --test test/citation.test.ts test/searchSnippet.test.ts test/thinking.test.ts test/token.test.ts test/useAIChat.test.ts test/useAIChat.queue.test.ts","typecheck":"vue-tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:862c19de-1407-4981-a112-c43f88fe0fb5"}},"repository":{"url":"git+https://github.com/0mao0/angineer-aichat-ui.git","type":"git"},"_npmVersion":"11.19.0","description":"Vue 3 AI 对话组件库（基于 ant-design-vue + KaTeX）：流式对话、引用卡片（Citation）、思维链展示，以及 `useAIChat` Composable。","directories":{},"sideEffects":["**/*.css","**/*.less","**/styles/**"],"_nodeVersion":"24.20.0","dependencies":{"katex":"0.18.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"3.5.41","less":"^4.2.0","katex":"0.18.4","vue-tsc":"^2.0.6","typescript":"~5.4.0","ant-design-vue":"4.2.6","@ant-design/icons-vue":"7.0.1"},"peerDependencies":{"vue":"3.5.41","ant-design-vue":"4.2.6","@ant-design/icons-vue":"7.0.1"},"_npmOperationalInternal":{"tmp":"tmp/aichat-ui_0.1.9_1789308524061_0.019987201145516442","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"_id":"@angineer/aichat-ui@0.2.0","bugs":{"url":"https://github.com/0mao0/angineer-aichat-ui/issues"},"dist":{"shasum":"82704df8f6a766adf52206533fffa09c2f11f41e","tarball":"https://registry.npmjs.org/@angineer/aichat-ui/-/aichat-ui-0.2.0.tgz","fileCount":27,"integrity":"sha512-zkBRFQtDqtRtBSwIcMir5figtOfczp0Q8aNNW6ZY8BOZC+xaHAqafsHKdA/rv4EX57TZsUTaXpLJUS4U0fqLeQ==","signatures":[{"sig":"MEQCICoVrSTk5nVKOQDaRgRPEZ9DmjXaiyiHuhQ01N/RsYp6AiBlmRnwaNCWIajU+d37/wMzMJDnxpQJERBYn8QGp3hH7w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDGUX9jYyTWGqaZ7+e01K3mAM4Inkyp0deMiHvYOO18LAiEA7xpmiPa1fQ5K3vY/Z79vww+C3hrYd+eka+Lz6YHGlXA="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@angineer%2faichat-ui@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":203306},"main":"./src/index.ts","name":"@angineer/aichat-ui","type":"module","types":"./src/index.ts","exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"},"./style":"./src/styles/index.less","./utils/citation":{"types":"./src/utils/citation.ts","import":"./src/utils/citation.ts"},"./utils/markdown":{"types":"./src/utils/markdown.ts","import":"./src/utils/markdown.ts"}},"gitHead":"6837d0d43b29b93887cd357a5b19b84801955b32","license":"MIT","scripts":{"test":"pnpm dlx tsx --test test/citation.test.ts test/searchSnippet.test.ts test/thinking.test.ts test/token.test.ts test/useAIChat.test.ts test/useAIChat.queue.test.ts","typecheck":"vue-tsc --noEmit"},"version":"0.2.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:862c19de-1407-4981-a112-c43f88fe0fb5"}},"homepage":"https://github.com/0mao0/angineer-aichat-ui#readme","repository":{"url":"git+https://github.com/0mao0/angineer-aichat-ui.git","type":"git"},"_npmVersion":"11.19.0","description":"Vue 3 AI 对话组件库（基于 ant-design-vue + KaTeX）：流式对话、引用卡片（Citation）、思维链展示，以及 `useAIChat` Composable。","directories":{},"maintainers":[{"name":"0mao0","email":"orangen@aliyun.com"}],"sideEffects":["**/*.css","**/*.less","**/styles/**"],"_nodeVersion":"24.21.0","dependencies":{"katex":"0.18.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"3.5.41","less":"^4.2.0","katex":"0.18.4","vue-tsc":"^2.0.6","typescript":"~5.4.0","ant-design-vue":"4.2.6","@ant-design/icons-vue":"7.0.1"},"peerDependencies":{"vue":"3.5.41","ant-design-vue":"4.2.6","@ant-design/icons-vue":"7.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aichat-ui_0.2.0_1790393902263_0.7384056958521183"}}},"time":{"created":"2026-08-27T12:58:02.577Z","modified":"2026-09-26T03:38:22.668Z","0.1.6":"2026-08-27T12:58:02.887Z","0.1.7":"2026-08-27T13:06:12.232Z","0.1.8":"2026-09-10T15:21:59.079Z","0.1.9":"2026-09-13T14:08:44.160Z","0.2.0":"2026-09-26T03:38:22.351Z"},"bugs":{"url":"https://github.com/0mao0/angineer-aichat-ui/issues"},"license":"MIT","homepage":"https://github.com/0mao0/angineer-aichat-ui#readme","repository":{"url":"git+https://github.com/0mao0/angineer-aichat-ui.git","type":"git"},"description":"Vue 3 AI 对话组件库（基于 ant-design-vue + KaTeX）：流式对话、引用卡片（Citation）、思维链展示，以及 `useAIChat` Composable。","maintainers":[{"name":"0mao0","email":"orangen@aliyun.com"}],"readme":"# angineer-aichat-ui\n\nVue 3 AI 对话组件库（基于 ant-design-vue + KaTeX）：流式对话、引用卡片（Citation）、思维链展示，以及 `useAIChat` Composable。\n\n## 安装\n\n已发布到 npm registry：\n\n```bash\npnpm add @angineer/aichat-ui\n```\n\n或从 GitHub 钉 tag 安装（源码同源）：`\"@angineer/aichat-ui\": \"github:0mao0/angineer-aichat-ui#v0.1.7\"`\n\n**环境要求**：peer 依赖 `vue@3.5.41`、`ant-design-vue@4.2.6`、`@ant-design/icons-vue@7.0.1`；KaTeX 作为包依赖随装。包为源码分发（无构建产物），宿主需用 Vite + `@vitejs/plugin-vue` 与 less 编译。\n\n## 使用\n\n```vue\n<template>\n  <AIChat\n    title=\"规范问答\"\n    scene=\"docs\"\n    session-id=\"default\"\n    library-id=\"my-library\"\n    @send=\"onSend\"\n    @answer-complete=\"onAnswer\"\n    @select-citation=\"onSelectCitation\"\n  />\n</template>\n\n<script setup lang=\"ts\">\nimport { AIChat } from '@angineer/aichat-ui'\nimport type { AIChatMessage, AIChatCitation } from '@angineer/aichat-ui'\n\nfunction onSend(message: string, model: string) { /* 自行对接后端流式接口 */ }\nfunction onAnswer(message: AIChatMessage) { /* ... */ }\nfunction onSelectCitation(citation: AIChatCitation) { /* ... */ }\n</script>\n```\n\n自定义对话逻辑可用 `useAIChat` Composable（暴露 `messages` / `loading` / `currentStreamContent` / `liveThinkingSteps` / `sendMessage` / `stopGeneration` / `clearMessages` / `startNewChat` 等）。\n\n## 导出\n\n- 组件：`AIChat`、`BaseChat`、`CitationInline`、`CitationMentionPanel`、`CitationPopover`、`CitationRichContent`、`InlineCitationEditor`\n- Composable：`useAIChat`\n- 子路径导出：`@angineer/aichat-ui/utils/citation`、`@angineer/aichat-ui/utils/markdown`\n\n## 主题定制\n\n**组件私有 token（`--chat-*`）**：使用处全部内置 fallback，不导入任何样式文件也能正常渲染（light 默认值）。导入 `@angineer/aichat-ui/style` 后获得完整 token 层——含 `[data-theme=\"dark\"]` 下的暗色值（dark 模式必需），并可在 `:root` 覆盖同名变量定制：\n\n| 变量 | light | dark（导入 style 后生效） | 用途 |\n| --- | --- | --- | --- |\n| `--chat-root-bg` | `var(--bg-primary, #ffffff)` | 自动跟随 `--bg-primary` | 聊天区背景 |\n| `--chat-user-bubble-bg` / `--chat-user-bubble-text` | `#e6f4ff` / `#000000` | `#15325b` / `rgba(255,255,255,0.85)` | 用户气泡 |\n| `--chat-assistant-bubble-bg` / `--chat-assistant-bubble-text` | `#f5f5f5` / `#000000` | `var(--bg-secondary, #1f1f1f)` / `var(--text-primary, …)` | 助手气泡 |\n| `--chat-citation-accent` / `--chat-citation-bg` / `--chat-citation-border` | `#1677ff` / `#e6f4ff` / `#91caff` | `#177ddc` / `#111a2c` / `#15325b` | 引用卡片 |\n| `--chat-code-bg` / `--chat-pre-bg` | `#f6f8fa` | `var(--bg-tertiary, rgba(255,255,255,0.04))` | 行内代码 / 代码块 |\n| `--chat-streaming-bg` / `--chat-streaming-cursor` | `#fffbe6` / `#1677ff` | `rgba(250,173,20,0.1)` / `#177ddc` | 流式输出态 |\n| `--chat-system-bg` / `--chat-system-border` / `--chat-system-text` | `#fafafa` / `#d9d9d9` / `#8c8c8c` | `var(--bg-secondary/--divider-color/--text-secondary, …)` | 系统消息 |\n| `--chat-error-color` / `--chat-error-hover` | `#ff4d4f` / `#ff7875` | `var(--danger, #dc4446)` / `#e86e6b` | 错误态 |\n\n**宿主语义变量契约**：组件同时引用通用语义变量（`--text-primary`、`--text-secondary`、`--border-color`、`--bg-primary`、`--bg-secondary`、`--bg-tertiary`、`--primary-color`、`--panel-header-bg`）以跟随宿主 dark/light 主题。宿主未定义时请在 `:root` 提供，例如 light 默认值：`--text-primary: rgba(0,0,0,0.85)`、`--text-secondary: rgba(0,0,0,0.65)`、`--border-color: rgba(0,0,0,0.06)`、`--bg-primary: #ffffff`、`--bg-secondary: #fafafa`、`--bg-tertiary: rgba(0,0,0,0.02)`、`--primary-color: #1890ff`、`--panel-header-bg: #fafafa`（dark 模式在 `[data-theme=\"dark\"]` 下覆盖同名变量即可）。\n\n## 测试\n\n```bash\npnpm --filter @angineer/aichat-ui test       # 31 个单元测试（tsx + node:test）\npnpm --filter @angineer/aichat-ui typecheck  # vue-tsc\n```\n\n## 仓库说明\n\n本仓库为独立发布仓，代码唯一真相源在 [AnGIneer](https://github.com/0mao0/AnGIneer) monorepo 的 `packages/aichat-ui`，经 `scripts/sync-standalone.ps1` 同步；版本以 git tag（vx.y.z）与 npm registry（`@angineer/aichat-ui`）同步发布。变更历史见 [CHANGELOG.md](./CHANGELOG.md)。\n","readmeFilename":"README.md"}