- 新增 web2/ 前端:任务卡看板、风险雷达、决策日志、我的团队、快捷指令 - ChatPanel 增强:风险卡置顶、案卡接入、起诉状向导、语音输入 - 事项看板:点击查看详情弹窗、断点续接(恢复历史对话+matterId) - 保密模式恢复:密码验证后重建内存 session,保留多轮上下文 - 多轮对话:ask/ask-stream/ask-analyze 注入 session 历史,AI 有上下文 - 追问优化:紧扣用户问题,不再偏离主题(社保问社保,工伤问工伤) - 对话区可滚动,输入区固定可见 - 状态机放宽:允许从任意非终态转到 pending_expert - session 存活检查端点,后端重启后自动重建 session - DB migration:风险推送表、案卡表 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
27 lines
649 B
PL/PgSQL
27 lines
649 B
PL/PgSQL
-- BossAi 2.0 回滚脚本 — 慎用,会删除案卡和专家关系数据
|
|
-- 运行:psql -d mcp -f migrations/001_bossai_v2_rollback.sql
|
|
|
|
BEGIN;
|
|
|
|
-- 移除 chat_messages 的 matter_id 列
|
|
ALTER TABLE chat_messages DROP COLUMN IF EXISTS matter_id;
|
|
|
|
-- 移除 sessions 的 matter_id 列(若存在)
|
|
DO $$
|
|
BEGIN
|
|
IF EXISTS (
|
|
SELECT 1 FROM information_schema.columns
|
|
WHERE table_name = 'sessions' AND column_name = 'matter_id'
|
|
) THEN
|
|
ALTER TABLE sessions DROP COLUMN matter_id;
|
|
END IF;
|
|
END $$;
|
|
|
|
-- 删除专家关系表
|
|
DROP TABLE IF EXISTS expert_relations;
|
|
|
|
-- 删除案卡表
|
|
DROP TABLE IF EXISTS matters;
|
|
|
|
COMMIT;
|