Keep context compaction logs to a status line
This commit is contained in:
1 parent
d04777247b
commit
49fe904626
3 files changed
+9
-7
No files matched your search
@@ -68,7 +68,9 @@ public class TaskController {
|
||||
@AuthenticationPrincipal SecurityConfig.Identity who, @PathVariable UUID id) {
|
||||
tasks.find(id, who.id());
|
||||
return db.queryForList(
|
||||
"SELECT * FROM (SELECT * FROM ai_task_steps WHERE task_id=? AND event NOT IN"
|
||||
"SELECT id,task_id,event,created_at,CASE WHEN event='CONTEXT_COMPACTED' THEN"
|
||||
+ " '压缩上下文中' ELSE detail END AS detail FROM (SELECT * FROM ai_task_steps WHERE"
|
||||
+ " task_id=? AND event NOT IN"
|
||||
+ " ('AUTO_SETTLEMENT','MANUAL_SETTLEMENT') ORDER BY created_at DESC,id DESC LIMIT"
|
||||
+ " 1000) AS recent ORDER BY created_at,id",
|
||||
id);
|
||||
|
||||
@@ -298,7 +298,7 @@ public class TaskService {
|
||||
history.through());
|
||||
if (updated != 1) throw new ApiError.Failure(409, "任务上下文交接记录已更新");
|
||||
}
|
||||
event(id, "CONTEXT_COMPACTED", "已自动压缩上下文并开启下一段对话,继续当前任务");
|
||||
event(id, "CONTEXT_COMPACTED", "压缩上下文中");
|
||||
}
|
||||
|
||||
public Map<String, Object> config(UUID id) {
|
||||
|
||||
Reference in new issue
Block a user