v0.8.4: WebUI sessions, diff, settings, slash commands and extensions
Sessions: rename, delete and search; /api/retry regenerates the last answer, editing a prompt resends from there; /api/export downloads the transcript as Markdown (cst_session_export_md). Session messages carry note/tool_result markers, so a reload rebuilds the tool steps with their arguments, output and exit status; subagent progress is shown. Diff and settings: /api/diff shows the real diff; /api/settings covers protocol, max_steps, tool switches and confirm; /api/permissions edits the rules; sandbox status is reported. Session rename no longer reads past a short title. Commands: slash commands with completion in the composer (/model, /provider, /new, /retry, /undo, /compact, /export, /diff, /init, /skill and more), a Ctrl+P palette, Shift+Tab cycles the approval mode, F1 or ? shows the keys. "Thinking expanded" is saved in the settings (show_thinking), "expand all tool output" in the browser. Extensions: GET /api/extensions lists MCP servers, plugins, skills, agent roles and subagent runs; POST /api/extensions/reload and /api/extensions/trust; a workspace switch reloads them. /api/init and /api/skill run on the server (cst_init_prompt shared with the TUI). Errors, statuses and [cst] notes are shown in Chinese with a readable reason instead of rc=; a failed turn's error survives the reload. Tests: scripts/e2e_webui_sessions.py, e2e_webui_workspace.py and e2e_webui_ext.py, run from e2e_webui.sh.
This commit is contained in:
@@ -130,6 +130,12 @@ const cst_message_t *cst_session_get(const cst_session_t *s, int i);
|
||||
const char *cst_session_path(const cst_session_t *s);
|
||||
int cst_session_clear(cst_session_t *s, int keep_system);
|
||||
int cst_session_rewrite(cst_session_t *s, const cst_message_t *msgs, int n);
|
||||
/* Tool output: role=tool, or a text-protocol user message answering a call. */
|
||||
int cst_message_is_tool_result(const cst_message_t *m);
|
||||
/* The transcript as Markdown, malloc'd (NULL on OOM). Tool output and call
|
||||
* arguments are cut at 4000 bytes. Takes the session lock. */
|
||||
char *cst_session_export_md(cst_session_t *s, const char *title,
|
||||
const char *sid, const char *model);
|
||||
/* Readers on another thread must hold the lock while using pointers returned
|
||||
* by cst_session_get (append may reallocate). Append locks internally. */
|
||||
void cst_session_lock(cst_session_t *s);
|
||||
|
||||
Reference in New Issue
Block a user