mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-11-05 19:53:50 +08:00
feat: Agent 任务名与对话标题双能力自动生成
新增 task_auto_title_enabled / chat_auto_title_enabled(默认关)、 共享 GenerateAutoTitle、spawn_task 同步写 name、对话首条先截断再异步 AI, 设置页「自动标题」双 Switch。closes #55
This commit is contained in:
1 parent
e740334b90
commit
6c781f21f4
11 files changed
+310
-1
No files matched your search
@@ -0,0 +1,14 @@
|
||||
package server
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestAutoTitleMayReplace(t *testing.T) {
|
||||
for _, current := range []string{"", "新对话", "首条消息预览"} {
|
||||
if !autoTitleMayReplace(current, "首条消息预览") {
|
||||
t.Fatalf("expected %q to be replaceable", current)
|
||||
}
|
||||
}
|
||||
if autoTitleMayReplace("用户手动改的标题", "首条消息预览") {
|
||||
t.Fatal("manual title must not be overwritten")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user