会话级profile绑定:sessions表加profile列(PRAGMA迁移,旧行空串=随模型);resolveProfileName优先级插层——每消息参数>会话绑定>模型默认>全量;bind路由双语义:profile=模式绑定任意状态即切(''解绑/default归一,存在性400同messages路由),model_id=原手动占模型路径零改动
This commit is contained in:
@@ -19,6 +19,7 @@ function initDb(dbPath) {
|
||||
last_model_id TEXT,
|
||||
assistant_type TEXT DEFAULT 'secretary',
|
||||
user TEXT DEFAULT '',
|
||||
profile TEXT DEFAULT '',
|
||||
created_at INTEGER NOT NULL,
|
||||
updated_at INTEGER NOT NULL,
|
||||
completed_at INTEGER,
|
||||
@@ -142,6 +143,11 @@ function initDb(dbPath) {
|
||||
if (!cols.some(c => c.name === 'user')) {
|
||||
db.exec("ALTER TABLE sessions ADD COLUMN user TEXT DEFAULT ''");
|
||||
}
|
||||
// 迁移:profile 记会话绑定的 prompt+tools 组合名(config.yml 顶层 model_profiles;''=随模型配置)。
|
||||
// 选取优先级见 engine.resolveProfileName,切换入口见 routes/sessions.js bind 路由(弹窗「模式」区)。
|
||||
if (!cols.some(c => c.name === 'profile')) {
|
||||
db.exec("ALTER TABLE sessions ADD COLUMN profile TEXT DEFAULT ''");
|
||||
}
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user