snow-flow 10.0.116 → 10.0.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli/cmd/tui/app.tsx +27 -1
- package/src/pty/index.ts +1 -0
- package/src/server/routes/tui-ws.ts +1 -0
package/package.json
CHANGED
package/src/cli/cmd/tui/app.tsx
CHANGED
|
@@ -118,6 +118,17 @@ export function tui(input: {
|
|
|
118
118
|
const skipThemeDetection = !!process.env.OPENCODE_SKIP_THEME_DETECTION || !!process.env.OPENCODE_REMOTE_TUI
|
|
119
119
|
// promise to prevent immediate exit
|
|
120
120
|
return new Promise<void>(async (resolve) => {
|
|
121
|
+
// Crash handlers for debugging PTY rendering issues
|
|
122
|
+
process.on("uncaughtException", (err) => {
|
|
123
|
+
console.error("[snow-flow] UNCAUGHT:", err.message, err.stack)
|
|
124
|
+
})
|
|
125
|
+
process.on("unhandledRejection", (err) => {
|
|
126
|
+
console.error("[snow-flow] UNHANDLED:", err)
|
|
127
|
+
})
|
|
128
|
+
process.on("exit", (code) => {
|
|
129
|
+
if (code !== 0) console.error("[snow-flow] EXIT code:", code)
|
|
130
|
+
})
|
|
131
|
+
|
|
121
132
|
let mode: "dark" | "light" = "dark"
|
|
122
133
|
if (skipThemeDetection) {
|
|
123
134
|
console.log("[snow-flow] skipping theme detection")
|
|
@@ -131,10 +142,25 @@ export function tui(input: {
|
|
|
131
142
|
resolve()
|
|
132
143
|
}
|
|
133
144
|
|
|
145
|
+
console.log("[snow-flow] env: OTUI_USE_ALTERNATE_SCREEN=" + (process.env.OTUI_USE_ALTERNATE_SCREEN ?? "unset"))
|
|
146
|
+
// Test: can this PTY display ANSI at all?
|
|
147
|
+
process.stdout.write("\x1b[32m[snow-flow] ANSI test: this should be green\x1b[0m\n")
|
|
148
|
+
console.log("[snow-flow] stdout.isTTY=" + process.stdout.isTTY + " stdin.isTTY=" + process.stdin.isTTY)
|
|
149
|
+
console.log("[snow-flow] stdout.columns=" + process.stdout.columns + " stdout.rows=" + process.stdout.rows)
|
|
150
|
+
|
|
151
|
+
// Timeout watchdog: if render doesn't produce output in 10s, log it
|
|
152
|
+
const watchdog = setTimeout(() => {
|
|
153
|
+
console.error("[snow-flow] WATCHDOG: render() has been running for 10s without visible output")
|
|
154
|
+
console.error("[snow-flow] This suggests the Zig renderer is stuck or not writing to stdout")
|
|
155
|
+
}, 10_000)
|
|
156
|
+
|
|
134
157
|
try {
|
|
135
|
-
console.log("[snow-flow]
|
|
158
|
+
console.log("[snow-flow] calling render()...")
|
|
136
159
|
await render(
|
|
137
160
|
() => {
|
|
161
|
+
// This callback is invoked when the renderer is ready to build the component tree
|
|
162
|
+
console.error("[snow-flow] render callback invoked - component tree building")
|
|
163
|
+
clearTimeout(watchdog)
|
|
138
164
|
return (
|
|
139
165
|
<ErrorBoundary
|
|
140
166
|
fallback={(error, reset) => <ErrorComponent error={error} reset={reset} onExit={onExit} mode={mode} />}
|
package/src/pty/index.ts
CHANGED