feat: 添加个人规则功能
- 新增个人规则管理模块 (personalRulesManager.ts) - 支持创建、编辑、删除多条规则 - 规则存储在用户目录 ~/.iccoder/rules/ - 对话时自动将规则传递给后端 - 添加后端对接文档和 webpack 优化指南
This commit is contained in:
@ -28,6 +28,7 @@ import type {
|
||||
PlanConfirmEvent,
|
||||
} from "../types/api";
|
||||
import { submitToolConfirm, submitAnswer, stopDialog } from "./apiClient";
|
||||
import { getActiveRules } from "../utils/personalRulesManager";
|
||||
import { ChatHistoryManager } from "../utils/chatHistoryManager";
|
||||
import { getUserIdFromToken, isTokenExpired } from "../utils/jwtUtils";
|
||||
import { updateCachedBalance } from "./creditsService";
|
||||
@ -502,6 +503,7 @@ export class DialogSession {
|
||||
compactedData: compactedData || undefined,
|
||||
newMessages: newMessages.length > 0 ? newMessages : undefined,
|
||||
knowledgeData: knowledgeData || undefined,
|
||||
personalRules: getActiveRules() || undefined,
|
||||
};
|
||||
|
||||
// 追踪用户消息
|
||||
|
||||
Reference in New Issue
Block a user