mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
feat(cli): ring bell when task completes in TUI
Watch session status transitions to idle and write BEL to bounce the dock icon / flash the taskbar.
This commit is contained in:
@@ -84,6 +84,7 @@ import { UI } from "@/cli/ui.ts"
|
||||
import { useTuiConfig } from "../../context/tui-config"
|
||||
|
||||
import { formatMarkdownTables } from "../../util/markdown" // kilocode_change
|
||||
import { bell } from "@/kilocode/bell" // kilocode_change
|
||||
|
||||
addDefaultParsers(parsers.parsers)
|
||||
|
||||
@@ -149,6 +150,17 @@ export function Session() {
|
||||
return messages().findLast((x) => x.role === "assistant")
|
||||
})
|
||||
|
||||
// kilocode_change start - ring terminal bell on task completion
|
||||
createEffect(
|
||||
on(
|
||||
() => sync.data.session_status?.[route.sessionID]?.type,
|
||||
(type, prev) => {
|
||||
if (prev && prev !== "idle" && type === "idle") bell()
|
||||
},
|
||||
),
|
||||
)
|
||||
// kilocode_change end
|
||||
|
||||
const dimensions = useTerminalDimensions()
|
||||
const [sidebar, setSidebar] = kv.signal<"auto" | "hide">("sidebar", "auto")
|
||||
const [sidebarOpen, setSidebarOpen] = createSignal(false)
|
||||
|
||||
Reference in New Issue
Block a user