feat: AI commit messages, change tree, router behavesAs, sidebar times (v2.2.0)
- Changes panel: Files and Changes merged into one panel; the overview's groups drawn as a folder tree (compacted chains, file counts, fold, stage/unstage a whole folder) - AI-suggested commit message for what is staged (POST /api/lanes/:id/git/commit-message, claude -p --safe-mode, haiku) - AI Router: optional "Behaves as" Claude model id, written as modelPicker options into the router's --settings file (issue #56) - Sidebar: session rows show last activity, live rows their start time; a closed Terminal row can be removed (DELETE /api/run/history/:id) - Every pane's CLI starts only once a client is attached; claude panes no longer forced inline; tmux scrollbar one column wide - Update notifier: "Check for updates" reopens a closed notice
This commit is contained in:
+83
-1
@@ -3,7 +3,7 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Agent Dashboard for Claude Code API
|
||||
version: 2.1.0
|
||||
version: 2.2.0
|
||||
description: HTTP API for real-time Claude Code session monitoring, agent lifecycle tracking, analytics, pricing, hooks ingestion, and workflow intelligence.
|
||||
contact:
|
||||
name: Nguyễn Ngọc Trí Vĩ
|
||||
@@ -10630,6 +10630,50 @@ paths:
|
||||
error:
|
||||
code: EBADORIGIN
|
||||
message: cross-origin requests are not allowed
|
||||
/api/run/history/{id}:
|
||||
delete:
|
||||
tags:
|
||||
- Run
|
||||
summary: Forget a closed Terminal tab
|
||||
description: Deletes one `dashboard_runs` row whose tool is `shell` — a closed Terminal tab, which has no session — so it leaves the sidebar's recently-closed list. Rows of any other tool are never deleted (404). The loopback same-origin guard applies.
|
||||
operationId: runHistoryForget
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The history row's id (RunHistoryItem.id).
|
||||
example: agenthub-lane-5-2@2026-10-06T08:00:00.000Z
|
||||
responses:
|
||||
'200':
|
||||
description: Removed
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
removed: agenthub-lane-5-2
|
||||
'403':
|
||||
description: 'Cross-origin rejected (EBADORIGIN). Enforced by the router-level loopback same-origin guard on every /api/run route: a browser request carrying an Origin/Referer whose host is not localhost / 127.0.0.1 / ::1 / 0.0.0.0 is refused. Requests without an Origin header (e.g. curl) are allowed.'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error:
|
||||
code: EBADORIGIN
|
||||
message: cross-origin requests are not allowed
|
||||
'404':
|
||||
description: No closed Terminal tab with that id (ENOTFOUND)
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
'409':
|
||||
description: That terminal is still open (ERUNLIVE)
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
/api/run/cwds:
|
||||
get:
|
||||
tags:
|
||||
@@ -11594,6 +11638,44 @@ paths:
|
||||
description: '{available, branches, current, worktrees}.'
|
||||
'404':
|
||||
description: Lane not found.
|
||||
/api/lanes/{id}/git/commit-message:
|
||||
post:
|
||||
tags:
|
||||
- Lanes
|
||||
summary: Suggest a commit message for the staged changes
|
||||
description: Runs the user's `claude` CLI (`-p --safe-mode --no-session-persistence --tools "" --model haiku`) on the STAGED diff of the lane's cwd (or `?session=` worktree), sent on stdin with the last ten commit subjects; a `settings.local.json` is never included. Reads only — nothing is staged or committed, no tool runs and no session is saved. Same-origin, since each call spends the user's Claude quota. 400 ENOSTAGED when nothing is staged, 400 ENOTOOL when `claude` is not on PATH, 502 EAI when the CLI fails, answers empty or runs past 120 s.
|
||||
operationId: suggestLaneCommitMessage
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- name: session
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: The suggested message
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
required:
|
||||
- message
|
||||
'400':
|
||||
description: ENOSTAGED / ENOTOOL / ENOWORKTREE
|
||||
'403':
|
||||
description: Cross-origin request refused
|
||||
'404':
|
||||
description: No such workspace
|
||||
'502':
|
||||
description: EAI — the claude CLI failed
|
||||
/api/lanes/{id}/git/{action}:
|
||||
post:
|
||||
tags:
|
||||
|
||||
Reference in New Issue
Block a user