feat(cli): add streaming output to Dashboard and child process termination

- Add broadcastStreamEvent() for real-time CLI output to Dashboard
- Send CLI_EXECUTION_STARTED/OUTPUT/COMPLETED events via /api/hook
- Add killCurrentCliProcess() to terminate child CLI on SIGINT/SIGTERM
- Track child process reference for cleanup on interruption
- Make CLI stream viewer panel full-height (calc(100vh - 32px))
- Fix completion status not updating by using consistent executionId

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-12-30 15:56:18 +08:00
parent 754cddd4ad
commit 4d73a3c9a9
3 changed files with 156 additions and 26 deletions

View File

@@ -22,11 +22,12 @@
/* ===== Main Panel ===== */
.cli-stream-viewer {
position: fixed;
top: 60px;
top: 16px;
right: 16px;
width: 650px;
bottom: 16px;
width: 700px;
max-width: calc(100vw - 32px);
max-height: calc(100vh - 80px);
height: calc(100vh - 32px);
background: hsl(var(--card));
border: 1px solid hsl(var(--border));
border-radius: 8px;
@@ -357,8 +358,7 @@
/* ===== Terminal Content ===== */
.cli-stream-content {
flex: 1;
min-height: 300px;
max-height: 500px;
min-height: 0;
overflow-y: auto;
padding: 12px 16px;
background: hsl(220 13% 8%);
@@ -566,15 +566,11 @@
/* ===== Responsive ===== */
@media (max-width: 768px) {
.cli-stream-viewer {
top: 56px;
top: 8px;
right: 8px;
left: 8px;
bottom: 8px;
width: auto;
max-height: calc(100vh - 72px);
}
.cli-stream-content {
min-height: 200px;
max-height: 350px;
height: calc(100vh - 16px);
}
}