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:
@@ -488,6 +488,16 @@ char *cst_skill_read(const char *ws, const char *name, const char *file,
|
||||
return cst_buf_steal(&b);
|
||||
}
|
||||
|
||||
const char *cst_init_prompt(void) {
|
||||
return "Analyze this repository and write an AGENTS.md file at the "
|
||||
"workspace root for future coding agents. Cover: what the project "
|
||||
"is, how to build, test and run it (exact commands), the directory "
|
||||
"layout, coding conventions you can infer from the code, and "
|
||||
"anything surprising. Explore with list_dir/glob/grep/read_file "
|
||||
"before writing. Keep it under 150 lines. If AGENTS.md already "
|
||||
"exists, improve it rather than starting over.";
|
||||
}
|
||||
|
||||
char *cst_skill_prompt(const char *ws, const char *name, const char *task) {
|
||||
int code = 0;
|
||||
char *body = cst_skill_read(ws, name, NULL, &code);
|
||||
|
||||
Reference in New Issue
Block a user