This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
青浦区营商智能助手前端。Vue 3 + TypeScript + Vite,面向企业的政策匹配与办事指引: 用户自然语言提问,助手检索政策知识库,以「开场概述 + 政策卡片 + 综合说明 + 参考资料」 的形式给出有原文依据的回答;涉及具体企业时先引导用户确认公司主体,再结合工商信息作答。
关键事实(避免误判):
POST /api/chat(SSE)。前端不直接渲染新协议,而是经适配层
src/components/api-chat-coordinator.ts 翻译成既有渲染组件可识别的内容标记。
详见下方「Core Systems」与根 README 的「对话接口的关键约束」。three 仅用于粒子背景(business-assistant-particle.ts);
src/three-libs/asr 用于语音识别;src/three-libs/metamaker 是一份未被引用的 SDK 包。useBusinessAssistantChat 内,
会话与消息持久化到 localStorage。docs/reference/(现行 api-chat.md;legacy/API.md 仅为交接快照)。# Development
npm run dev # Start dev server on port 8083 (HTTPS, self-signed)
npm run preview # Preview production build
# Building
npm run build # Production build
npm run build:test # Test environment build
npm run build:qingpu # Qingpu environment build
npm run zip # Create ZIP for Qingpu deployment
# Testing
npm run test # Run Jest tests
# Linting (use VSCode or external tools)
# ESLint config at .eslintrc.js
src/main.ts - Application entry point, creates Vue appsrc/App.vue - Root component, renders the 招商助手src/components/BusinessAssistant.vue - 只做 PC / 移动端切换,不是主壳src/components/BusinessAssistantPC.vue / BusinessAssistantMobile.vue - 真正的页面主壳
(输入区、消息列表、滚动与打字机联动都在这里)src/components/Chat/ - 消息渲染与政策卡片(BusinessRecord、PolicyMatch、QuestionCard…)src/components/Common/ - 通用 UI 组件(MediaViewer、ScrollList、Toast…)src/components/business-assistant/ - 对话编排(useBusinessAssistantChat、上传、滚动等)src/network/api/ - 接口封装:chat-sessions.ts、enterprise.ts、
assistant-statistics.ts、card/(没有 chat / faq / finance / group / human / project 这些文件)src/types/ - TypeScript 类型定义src/utils/ - 工具(runtime-config、stream-xml-filter、scope-record-rows…)src/three-libs/asr/ - 语音识别(Three.js 相关代码只在这里和粒子背景中用到)注意:没有
src/hooks/目录。
src/components/api-chat-coordinator.ts —— 新接口 POST /api/chat
的客户端。把 SSE 事件翻译成 <scope> / <!-- POLICY_TABLE --> / <ref_links> /
<question-cards> 等标记,交给既有渲染组件;渲染层不感知新协议。src/components/stream-message-coordinator.ts。
没有 stream-message-coordinator-v2.ts 这个文件。localStoragevite.config.ts.env.development, .env.production, .env.test, .env.qingpu仓库内没有 .gitlab-ci.yml 等流水线配置文件;构建入口就是上面的 npm scripts。
若存在服务端流水线(GitLab / Gitea 后台配置),其规则请在服务端查看,不要以旧描述为准。
/api/* → http://aixq.shqp.gov.cn/chat-api/* → http://192.168.2.23:8000(新对话接口;rewrite 去掉 /chat-api 前缀,
最终请求 …/api/chat。仅 dev server 生效,生产需 nginx 等价转发)/asr/* → https://human-screen-v3.metamaker.cn/stream/* → https://flv-enc.metamaker.cn@ alias for src/ in importsthree/build/three.cjs本仓库用 harness/ 目录管理长时开发的状态。这些文件不会自动维护——你必须按下面的要求读和写。
详见 harness/README.md。
pwd 确认在仓库根目录harness/claude-progress.md(当前已验证状态 + 上一轮记录)harness/feature_list.json(功能清单与状态)git log --oneline -5 查看最近提交(若仓库尚无提交,跳过即可)bash harness/init.shblockedin_progress 功能只有在要求的验证成功、且结果被记录进 harness/feature_list.json 的 evidence
与 harness/claude-progress.md 之后,功能状态才可以切到 passing。
harness/claude-progress.md(追加一条 session 记录)harness/feature_list.json 的状态与证据harness/clean-state-checklist.mdsrc/components/api-chat-coordinator.ts
翻译成既有渲染组件能识别的内容标记(<scope> / <!-- POLICY_TABLE --> /
<ref_links> / <question-cards>),不要新建带自有样式的 UI 组件。src/components/stream-message-coordinator.ts 是保留的旧协议实现,当前未被使用,不要改动。F:\yysk\AI_zhaoshang\备份\zhaoshang-llm
(早于所有改动),不要凭记忆断言。docs/reference/api-chat.md(现行契约) 与
docs/reference/api-chat-fields-zh.md(字段中英对照)。索引见 docs/reference/README.md。docs/reference/legacy/API.md 是交接时根据当时的源码生成的快照,不是规格、不会更新。
不要照着它实现新功能(现行契约看 api-chat.md),
也不要拿它当"原来行为是什么"的判据——它是二手整理可能失真;
判断原行为请直接 diff 备份目录里的源码。