Add TUI notifications and attention sounds (disabled by default) (#26980)

This commit is contained in:
Sebastian
2026-05-13 03:26:25 +02:00
committed by GitHub
parent adccab5970
commit d6367853ae
73 changed files with 1856 additions and 480 deletions

View File

@@ -1,10 +1,11 @@
import { chmod, mkdir, readFile, stat as statFile, writeFile } from "fs/promises"
import { createWriteStream, existsSync, statSync } from "fs"
import { realpathSync } from "fs"
import { dirname, join, relative, resolve as pathResolve, win32 } from "path"
import { dirname, isAbsolute, join, relative, resolve as pathResolve, win32 } from "path"
import { Readable } from "stream"
import { pipeline } from "stream/promises"
import { Glob } from "@opencode-ai/core/util/glob"
import { fileURLToPath } from "url"
// Fast sync version for metadata checks
export async function exists(p: string): Promise<boolean> {
@@ -142,6 +143,12 @@ export function resolve(p: string): string {
}
}
export function resolveFilePath(root: string, file: string): string {
const raw = file.startsWith("file://") ? fileURLToPath(file) : file
if (isAbsolute(raw)) return raw
return pathResolve(root, raw)
}
export function windowsPath(p: string): string {
if (process.platform !== "win32") return p
return (