Commit Graph

64 Commits

Author SHA1 Message Date
Sycun 524ee29a84 perf(all): propagate GET abort signals globally and eliminate full conversation loads
- Propagate useResource AbortSignal automatically via runWithAbortSignal in http.js so all 60+ useResource loaders across all pages (including Dashboard's 18 parallel requests) cancel underlying browser fetches immediately on page switch
- Replace unnecessary full db.GetConversation loads (which unmarshaled all messages and process_details) with ConversationExists/GetConversationTitle/GetConversationLite across multi_agent_prepare, single_agent, conversation rename/project/delete-turn, attackchain, and robot handlers
- Default WebShell GET /ai-history to GetConversationByWebshellConnectionIDLite unless include_process_details=1 is explicitly requested
- Rebuild web/static/app bundle and verify 58 Playwright E2E tests + Go test suites
2026-11-28 19:06:11 +08:00
Sycun 966836ef19 perf(chat): eliminate old conversation loading lag and polling livelock
- Add compact summary mode (include_process_details=summary) on GET /api/conversations/:id that skips progress noise, strips duplicated tool outputs/large arguments/long thinking bodies/finalText, and defers full payloads for on-demand GET /api/process-details/:id fetches
- Prevent paginated GET /api/messages/:id/process-details from leaking full tool_result payloads through message when includeToolPayload is false
- Add stdlib Gzip response compression middleware (skipping SSE, WebSocket, and already-compressed assets)
- Add SQLite composite indexes on messages(conversation_id, created_at) and process_details(conversation_id/message_id, created_at)
- Switch chat page to summary loading with on-demand ToolBlock/ReasoningBlock detail fetching, AbortController cancellation, and in-flight poll deduplication to fix backgroundRunning 4s polling livelock
- Memoize MessageRow/TurnBody, defer prettyJson until panel expansion, and window long conversation histories (>40 messages)
- Rebuild web/static/app bundle and add Go + Playwright regression tests
2026-11-28 18:41:33 +08:00
Sycun cb1507df6c feat(chat): group conversations and consolidate header actions 2026-11-20 15:14:00 +08:00
Sycun 7320cc608a fix: restore session collaboration and refine workspace UI 2026-11-19 13:06:42 +08:00
Sycun 6815645a3f fix(chat): persist human approval for the conversation 2026-11-19 10:45:23 +08:00
Sycun cfe3f82dd4 fix(pi): invalidate deleted sessions and prepare legacy upgrades 2026-11-12 21:19:09 +08:00
Sycun 0dd997ca01 refactor(runtime): remove Eino and make Pi the sole agent engine 2026-11-11 12:45:32 +08:00
Sycun 6a67364947 feat: add vulnerability retest branches with an isolated evidence log
Retesting a finding creates an independent conversation branch that
snapshots the source history and model trace, so verification can run
multi-turn without writing to the original session.

- POST /api/vulnerabilities/:id/retest creates the branch and persists the
  prompt, so a lost response, navigation or refresh can resume it
- new update_vulnerability_status tool closes the loop; a retest branch may
  only read and update its own finding
- {{vulnerability_id}}, {{conversation_id}} and {{source_conversation_id}}
  resolve on send, in the first turn and in follow-ups
- evidence appends to a read-only vulnerabilities.retest_log column instead
  of retest_notes: that field is operator-authored and the edit form
  rewrites it wholesale, so a routine edit used to erase the retest trail
- the retest prompt is prefilled with the operator's retest_notes, which
  already states how to verify the fix
- copied messages are re-bound as time.Time. Scanning a DATETIME column into
  a string yields RFC3339Nano while AddMessage writes the driver's
  space-separated format, and messages sort on the raw created_at text, so a
  branch rendered its new turn above the inherited history
2026-10-10 07:21:20 +08:00
Sycun 470eb5ead1
feat: add runtime storage cleanup with per-category retention (#310) (#313)
Runtime artifacts (agent workspaces, tool-output spill, C2 payloads, chat
uploads, workflow checkpoints, diagnostic logs) previously accumulated
without bound: most were only removed when a conversation or project was
deleted, and tmp/c2 plus workflow checkpoints were never removed at all.

Add a storage cleaner with named per-category tasks (Gitea-style), a
settings page tab, and a background sweep that is off by default so
upgrading never deletes existing data.

Safety properties, since mis-deleting live task data costs far more than
the disk saved:
- dry-run is the default; a real cleanup requires dry_run=false together
  with confirm=true at the API layer, not just a frontend dialog
- sessions active within active_grace_hours are always skipped, and a
  failed activity lookup skips conservatively (fail closed)
- directories whose conversation/project no longer exists are reclaimed
  as orphans after orphan_grace_days
- scanners never follow symlinks and every candidate path is confined to
  its category root; deletion renames to a .tmp-for-deletion marker first
  so a crash leaves recoverable residue instead of a half-deleted dir
- storage:* permissions are admin-only; without the grantSystemRolePermissions
  skip the default branch would have given operators an irreversible
  file-deletion right

Also fix two confirmed leaks: DeleteConversation left chat_uploads files
on disk (their rows already vanished via ON DELETE CASCADE), and workflow
checkpoints had no deletion path at all.

Co-authored-by: Parallels <parallels@kali-linux-2025-2.localdomain>
2026-09-25 14:46:23 +08:00
Ed1s0nZ 6ad9ea2d13 feat: add configurable tool call blocking and monitoring 2026-09-08 09:44:32 +08:00
temp c70da22de7 Remove conversation grouping feature 2026-08-26 15:00:09 +08:00
temp e218316c55 Add token usage tracking and UI refinements 2026-08-24 00:05:05 +08:00
temp 3bcf4458c5 Fix finalization cleanup for pending tool executions 2026-08-23 19:57:17 +08:00
公明 24d06c5220 Fix missing results for parallel Eino tool calls.
Merge streaming tool outputs by CallID with ConcatMessages, pair same-name historical results, and FIFO-match duplicate IDs so concurrent nmap 1/2 and 2/2 stay distinct.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 00:29:12 +08:00
公明 5aa2c382b0
Add files via upload 2026-08-18 20:34:53 +08:00
公明 55ee5fbac9
Delete internal directory 2026-08-18 20:14:29 +08:00
公明 01c0750d98
Add files via upload 2026-08-15 01:58:38 +08:00
公明 2910289f0b
Delete internal directory 2026-08-15 01:54:26 +08:00
RuoJi6 eb6bab574f
优化项目对话、刷新续流、实时滚动与工具状态恢复 (#245)
* feat(chat): add project-based conversation sidebar

* feat(chat): refine Codex-style conversation UI

* feat(chat): add Codex-style conversation workflow

* feat(ui): 优化对话框与项目侧边栏交互

* fix(chat): 修复暗色输入框圆角填色

* fix(chat): 恢复输入区分层错位布局

* fix(hitl): isolate reviewer state per conversation

* feat(hitl): 增加双入口审批与倒计时进度

* fix(hitl): 汇总项目审批并隔离对话状态

* fix(ui): 修复审批状态与无项目新任务

* fix(ui): 优化审批状态与对话切换性能

* fix(ui): 修复中断任务审批仍计时

* fix(ui): 修复多对话并发切换卡顿

* fix(hitl): 主动同步审批并关闭中断状态

* fix(ui): 固定项目审批汇总为绿色

* feat(ui): 同步系统模型与推理强度

* feat(ui): 完善项目侧栏预览与新建入口

* fix(ui): 防止无项目文件夹误展开

* fix(ui): 防止长历史对话滚动误触审批

* fix(ui): 修复对话操作并补充项目置顶

* fix(ui): 移除对话分组并调整项目置顶排序

* feat(ui): 优化迭代导航与审批交互

* fix(hitl): 将 write_file 加入内置免审批工具

* fix(chat): 支持回车发送与 Shift 回车换行

* fix(chat): 优化对话刷新与 Codex 风格交互

* fix(ui): 显示对话具体更新时间

* fix(ui): 优化对话刷新与项目加载

* fix(ui): 修复 Agent 审查文字裁切

* fix(chat): 修复刷新续流与多标签页同步

* fix(chat): 修复滚动跟随与中断任务终态

* fix(ui): 修复流式滚动跳动与工具状态恢复

* fix(ui): 修复刷新后流式输出停止粘底
2026-08-13 21:28:37 +08:00
公明 84e99220ff
Add files via upload 2026-07-31 21:12:01 +08:00
公明 4a19620137
Add files via upload 2026-07-28 18:22:30 +08:00
公明 5cbd828cad
Add files via upload 2026-07-24 15:52:16 +08:00
公明 4943b9419e
Add files via upload 2026-07-23 19:52:14 +08:00
公明 577c97aab0
Add files via upload 2026-07-22 21:04:18 +08:00
公明 2d7f5322b3
Add files via upload 2026-07-22 16:29:24 +08:00
公明 a2744d6936
Add files via upload 2026-07-10 16:42:35 +08:00
公明 0fa739d438
Add files via upload 2026-07-09 16:00:23 +08:00
公明 46ecb2f13b
Add files via upload 2026-07-09 14:34:23 +08:00
公明 553d0ed6bf
Add files via upload 2026-06-30 17:59:02 +08:00
公明 8571e41138
Add files via upload 2026-06-29 16:24:43 +08:00
公明 537843b6b8
Add files via upload 2026-06-26 14:24:01 +08:00
公明 cfe9573ac3
Add files via upload 2026-06-24 23:30:40 +08:00
公明 5d77a99236
Add files via upload 2026-06-23 21:01:35 +08:00
公明 c3d2a41301
Add files via upload 2026-06-23 01:54:29 +08:00
公明 0b4a11d01a
Add files via upload 2026-06-19 01:38:30 +08:00
公明 d5a0f93c6c
Add files via upload 2026-06-18 12:40:54 +08:00
公明 cf1f8515d9
Delete internal directory 2026-06-18 12:37:39 +08:00
公明 4661862a1a
Add files via upload 2026-06-11 18:03:09 +08:00
公明 dc9ecae7fd
Add files via upload 2026-06-11 01:43:35 +08:00
公明 6bacac2e6a
Add files via upload 2026-06-09 20:27:45 +08:00
公明 25f8b610fb
Add files via upload 2026-06-09 17:37:04 +08:00
公明 1b1aed1699
Add files via upload 2026-05-26 14:27:44 +08:00
公明 23bd6288ff
Add files via upload 2026-05-20 16:39:13 +08:00
公明 eab5b73846
Add files via upload 2026-05-15 11:46:02 +08:00
公明 d2b6a154de
Add files via upload 2026-05-11 19:54:40 +08:00
公明 d82ea60827
Add files via upload 2026-05-06 17:56:30 +08:00
公明 eda5f9bba1
Add files via upload 2026-04-29 02:59:34 +08:00
公明 62a0d8cb71
Add files via upload 2026-04-28 11:40:09 +08:00
公明 2de0bd4d31
Add files via upload 2026-04-19 01:25:30 +08:00
公明 5ef7618f44
Delete internal directory 2026-04-19 01:14:50 +08:00