WeKnora/internal/router
nullptr-error fbaff900a0
feat(chat): append messages to a running agent turn (#3123)
* feat(stream): persist live-run markers and per-run steer queues

Mid-run sends need a cross-replica pointer to the generating
assistant and a control-plane list that never hits the SSE stream.

* feat(agent): inject queued user messages at ReAct round boundaries

The engine drains the steer sink after each round, persists accepted
rows, and delays Done until after a loop-end inject so the turn can continue.

* feat(session): expose /steer and hand leftover messages to a follow-up turn

Owner-scoped steer routes queue or inject into the live run, single-flight
AgentQA via the live-run marker, and history replay keeps multiple user rows
inside one turn.

* feat(frontend): queue mid-run messages while an agent turn streams

Stop and Send stay visible together, the overlay follows server delivery,
and history splits the transcript around injected user bubbles.

* fix(frontend): type pending and client_id on SteerQueueItem

vue-tsc failed because the overlay sets those fields while POST /steer is in flight.

* fix(session): harden steer persist, handoff, and new_run

Keep SetLiveRun ahead of SSE and roll back orphan turns, make inject
persist idempotent, append-then-delete on rebind, cap overrun rounds,
and stop aborting a live stream when /steer returns new_run.

* fix(session): satisfy pre-push lint on steer paths

Wrap long lines, check discarded Error/Emit results, and keep
context as the first argument so the fork push hook can pass.

---------

Co-authored-by: hailongzhao <hailongzhao@tencent.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-09 16:43:33 +08:00
..
deployment_capabilities.go feat: require opt-in for the Docker sandbox backend (#2936) 2026-09-01 15:42:28 +08:00
deployment_capabilities_test.go feat: require opt-in for the Docker sandbox backend (#2936) 2026-09-01 15:42:28 +08:00
files.go refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
rbac.go refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
rbac_selfcheck_test.go Refine scoped API key capabilities 2026-07-07 12:00:13 +08:00
router.go feat(sandbox): add an interactive terminal and files tab beside chat (#3110) 2026-09-08 17:43:15 +08:00
router_api_key_capabilities_test.go feat(mcp)!: streamline setup and use short routing handles 2026-09-09 16:11:52 +08:00
router_api_key_management_test.go feat: support updating API key configuration 2026-08-12 11:43:03 +08:00
router_files_test.go refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
router_knowledge_download_test.go fix(knowledge): restrict source file download to Editor and above 2026-07-23 22:19:39 +08:00
router_presigned_test.go refactor(api-keys): remove API key reset endpoint and update documentation 2026-07-07 12:00:13 +08:00
router_static_test.go feat(resource): add stable resource registry with LLM-context alias compaction 2026-07-15 17:02:43 +08:00
router_wiki_test.go Remove redundant Wiki operation log 2026-07-28 11:18:33 +08:00
routes_agent.go feat(skills): store skills in a tenant catalog and install per sandbox 2026-08-28 15:17:37 +08:00
routes_auth_tenant.go feat(sandbox): inject per-user and workspace skill env vars at execution 2026-08-27 14:32:00 +08:00
routes_chat.go feat(chat): append messages to a running agent turn (#3123) 2026-09-09 16:43:33 +08:00
routes_infra.go feat(mcp)!: streamline setup and use short routing handles 2026-09-09 16:11:52 +08:00
routes_knowledge.go refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
routes_memory.go feat(memory): add cross-session long-term memory 2026-08-13 18:00:02 +08:00
static.go refactor(router): split the 2390-line router.go by domain and dedupe the file proxies 2026-07-27 11:25:23 +08:00
sync_task.go feat(memory): add cross-session long-term memory 2026-08-13 18:00:02 +08:00
sync_task_retry_test.go fix: retry document summaries before fallback 2026-08-05 19:29:32 +08:00
task.go refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
task_delete_scope_test.go refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
task_inspector.go feat(runtime): add bulk purge for archived queue tasks and chat_attachment i18n 2026-07-23 16:52:35 +08:00
task_inspector_errors.go fix(task-inspector): handle lazy queue not found errors 2026-07-23 14:24:21 +08:00
task_inspector_errors_test.go fix(task-inspector): handle lazy queue not found errors 2026-07-23 14:24:21 +08:00
task_inspector_kb_cancel_test.go fix(tasks): dequeue work for deleted knowledge bases 2026-07-23 12:17:14 +08:00
task_inspector_runtime_test.go fix(task-inspector): handle lazy queue not found errors 2026-07-23 14:24:21 +08:00
task_processing_scope_test.go refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00