feat: add diagnostics tool for live command output monitoring
ci / check (macos-latest) (push) Canceled after 0s
ci / check (ubuntu-latest) (push) Canceled after 0s
ci / check (windows-latest) (push) Canceled after 0s

- Implemented diagnostics functionality to start, stop, and monitor background check commands.
- Created a DiagnosticsPanel for real-time output display in the UI.
- Added support for auto-detecting default diagnostics commands based on project configuration.
- Introduced run_checks tool to execute project verification commands and report results.
- Enhanced tools-extra with functions to parse AGENTS.md and package.json for check commands.
- Added diff review functionality to visualize changes made in the last turn.
- Implemented tests for diagnostics and run_checks functionalities to ensure reliability.
This commit is contained in:
asepharyana committed 2026-09-11 22:09:19 +07:00
1 parent b0da909454
commit de89457cf7
18 files changed
+1168 -11

No files matched your search

+15
View File
@@ -1,3 +1,4 @@
import { renderDiffReview } from '../diff-review';
import { costOf, formatUsd, PRICING_VERIFIED_AT } from '../pricing';
import type { Session } from '../session';
import { toolSetOf } from '../tools';
@@ -120,3 +121,17 @@ export function workflowPanel(session: Session): Panel {
const body = rows.map(([k, v]) => `${k}: ${v}`).join('\n');
return { title: 'workflow', body };
}
/** Raw unified diff of the last turn's file changes. */
export function diffPanel(session: Session): Panel {
const diff = session.diffLastTurn();
if (!diff) return { title: 'diff', body: 'the last turn changed no files (bash effects are not diffed)' };
return { title: 'diff', body: diff };
}
/** Structured per-hunk review of the last turn's file changes. */
export function diffReviewPanel(session: Session): Panel {
const diff = session.diffLastTurn();
if (!diff) return { title: 'diff review', body: 'the last turn changed no files (bash effects are not diffed)' };
return { title: 'diff review', hint: 'file:line anchors point to the new side', body: renderDiffReview(diff) };
}