Changeset 0.22.4 (#146)
This commit is contained in:
34
CHANGELOG.md
34
CHANGELOG.md
@@ -2,6 +2,40 @@
|
||||
|
||||
All notable changes to Chat Switchboard.
|
||||
|
||||
## [0.22.4] — 2026-03-02
|
||||
|
||||
### Added
|
||||
- **Rate limit tracking.** Provider health windows now track HTTP 429 / rate limit events separately from general errors. New `rate_limit_count` column on `provider_health` table. `RecordRateLimit()` method on health accumulator. Completion handler and stream loop classify `HTTP 429` / `rate limit` / `Too Many Requests` errors automatically.
|
||||
- **Auto-disable policy.** Providers that report "down" status for N consecutive hourly windows are automatically deactivated. Configurable via `PROVIDER_AUTO_DISABLE_THRESHOLD` env var (default: 3, set to 0 to disable). `AutoDisabler` interface on health store, `checkAutoDisable()` runs on each flush cycle.
|
||||
- **Tool health tracking.** Built-in tools (web_search, url_fetch, etc.) now record success/error/latency to `tool_health` table via the health accumulator. `RecordToolSuccess()` / `RecordToolError()` methods. Both tool execution sites in stream loop instrumented. `ToolHealthWindow` and `ToolHealthSummary` models.
|
||||
- **Search provider health tracking.** web_search and url_fetch tool calls are now included in the tool health pipeline with per-invocation latency and error recording.
|
||||
- **Project-specific file uploads.** `POST /api/v1/projects/:id/files` (multipart upload) and `GET /api/v1/projects/:id/files` (list). `project_id` column on `attachments` table. Files are stored under `projects/{id}/` prefix. Project access verified via ownership or team membership. Files queued for text extraction if enabled.
|
||||
- **Workspace settings UI.** Git configuration section in project settings panel: remote URL, branch, credential selector. Appears when a workspace is bound. Saves via `PATCH /api/v1/workspaces/:id`. `updateWorkspace()` and `listGitCredentials()` API client methods.
|
||||
- **PDF/DOCX export via pandoc.** New `POST /api/v1/export` endpoint converts markdown content to PDF or DOCX using pandoc. Editor export dropdown now includes "Export as PDF" and "Export as DOCX" options. Graceful error handling when pandoc is unavailable.
|
||||
- **Project files UI.** File list and upload button in project settings panel. Shows file names and sizes. Multi-file upload support.
|
||||
- **API client methods.** `projectUploadFile`, `projectListFiles`, `exportDocument`, `updateWorkspace`, `listGitCredentials`.
|
||||
|
||||
### Changed
|
||||
- `health/accumulator.go`: Added `rateLimitCount` to bucket, `RecordRateLimit()`, `RecordToolSuccess()`, `RecordToolError()`, `flushTools()`, `checkAutoDisable()`, `SetAutoDisable()`, `AutoDisabler` interface, `toolBucket` struct. `Store` interface extended with `UpsertToolWindow()`, `ListAllToolCurrent()`.
|
||||
- `handlers/completion.go`: `HealthRecorder` interface extended with `RecordRateLimit()`, `RecordToolSuccess()`, `RecordToolError()`. `recordHealth()` classifies HTTP 429 errors.
|
||||
- `handlers/stream_loop.go`: Both tool execution sites now record tool health. `recordHealthFn()` classifies rate limit errors.
|
||||
- `models/models.go`: `RateLimitCount` field on `ProviderHealthWindow`. `ToolHealthWindow`, `ToolHealthSummary` types. `ErrorCount`, `RateLimitCount`, `TimeoutCount` fields on `ProviderHealthSummary`. `ProjectID` field on `Attachment`.
|
||||
- `store/postgres/health.go`: All queries updated for `rate_limit_count`. `UpsertToolWindow()`, `ListAllToolCurrent()`, `DeactivateProvider()` methods.
|
||||
- `store/sqlite/health.go`: Full rewrite with rate_limit_count, tool health, and auto-disable support.
|
||||
- `store/postgres/attachment.go`: `project_id` in cols, scan, create, and new `GetByProject()`.
|
||||
- `store/sqlite/attachment.go`: Same project_id additions.
|
||||
- `store/interfaces.go`: `GetByProject()` on `AttachmentStore`.
|
||||
- `config/config.go`: `ProviderAutoDisableThreshold` field + env var loading.
|
||||
- `main.go`: SQLite health store branching, auto-disable wiring, export handler route, project file routes.
|
||||
- `handlers/health_admin.go`: Health summary includes error_count, rate_limit_count, timeout_count.
|
||||
- `src/js/ui-admin.js`: Health dashboard cards show "Rate Limits" count with warning color.
|
||||
- `src/js/projects-ui.js`: Git settings section, project files section, file upload handler.
|
||||
- `src/js/editor-mode.js`: PDF and DOCX export menu items and handler.
|
||||
- `src/js/api.js`: 5 new API client methods.
|
||||
|
||||
### Database
|
||||
- Migration 015 (Postgres) / 014 (SQLite): `rate_limit_count` column on `provider_health`, `tool_health` table, `project_id` column on `attachments`.
|
||||
|
||||
## [0.22.3] — 2026-03-02
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user