Changeset 0.37.18 (#230)

Co-authored-by: gobha <jasafpro@gmail.com>
Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
2026-03-24 19:55:14 +00:00
committed by xcaliber
parent 96a4f16bc5
commit 3a4afea7f2
34 changed files with 1534 additions and 1290 deletions

View File

@@ -1,5 +1,63 @@
# Changelog
## [0.37.18.0] — 2026-03-24
### Summary
Debug/Model surface rebuild + workspace bridge. Debug modal converted from
673 lines of imperative DOM JS to a Preact component tree (CR P2-5). User
default workspace auto-created on first access. Tool outputs auto-save file
refs linked to assistant messages. "Save to workspace" action on chat code
blocks. Model selector shows provider health dots. Provider "Test Connection"
buttons added to both BYOK and admin UIs.
### Added
- **Debug modal Preact rebuild:** Engine singleton (`debugEngine`) with
subscribe() pattern for reactive updates. Component tree: ConsoleTab,
NetworkTab, StateTab, ReplTab, DebugBadge. `sw-debug.css` extracted from
`modals.css`. `debug.js` reduced from 673 to ~40 lines (thin bootstrap).
`repl.js` absorbed into `repl-tab.js`. (`src/js/sw/components/debug/`)
- **Default user workspace:** `GET /workspaces/default` auto-creates a
"My Files" workspace per user on first access. Idempotent. Route wired
before `:id` param. SDK: `sw.api.workspaces.getDefault()`.
(`server/handlers/workspaces.go`, `server/main.go`)
- **tool_output auto-save:** When `workspace_write` or `workspace_patch`
tools succeed during completion, a file ref with `origin=tool_output` is
recorded in the `files` table, linked to the assistant message via
`message_id`. (`server/handlers/tool_loop.go`, `completion.go`)
- **Origin filter on channel files:** `GET /channels/:id/files?origin=`
query param. SDK: `sw.api.channels.files(id, {origin})`.
(`server/handlers/files.go`)
- **Save-to-Workspace bridge:** Save button on assistant messages with code
blocks. Saves to user's default workspace with auto-generated filenames.
`guessExtension()` utility (37 language mappings). (`message-actions.js`,
`message-bubble.js`, `code-block.js`)
- **Model selector health dots:** Provider health status (green/yellow/red)
shown next to model names in chat selector. Admin-only, graceful degrade
for non-admin. (`model-selector.js`)
- **Provider test buttons:** "Test Connection" in Settings BYOK and "Test"
in Admin providers. Calls `fetchModels()` and shows success/failure toast.
(`settings/providers.js`, `admin/providers.js`)
### Changed
- `modals.css`: Debug-specific rules moved to `sw-debug.css` (~22 rules).
- `base.html`: 46-line debug modal HTML block replaced by `<div id="debugMount">`.
- `sw.js`: Service worker cache list updated (repl.js removed, sw-debug.css added).
- `LoopResult` struct: new `FileRefs` field for tool file output tracking.
- `channels.files` SDK method: now accepts optional opts for query params.
### Removed
- `src/js/repl.js` (527 lines) — absorbed into Preact `repl-tab.js`.
### ICD / OpenAPI / SDK Test Runner
- ICD: `GET /workspaces/default` documented; tool_output creation behavior updated.
- OpenAPI: `/api/v1/workspaces/default` endpoint added.
- SDK runner: 2 workspace tests (getDefault + idempotent), 1 channel files origin filter test.
## [0.37.17.0] — 2026-03-24
### Summary