File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,6 @@ backend/dist/
88frontend /demo-recordings /
99frontend /test-results /
1010frontend /playwright-report /
11- frontend /playwright /.cache /
11+ frontend /playwright /.cache /
12+
13+ backend /.streaming /
Original file line number Diff line number Diff line change 1111 "tasks" : {
1212 "generate-version" : " node scripts/generate-version.js" ,
1313 "copy-frontend" : " node scripts/copy-frontend.js" ,
14- "dev" : " deno task generate-version && dotenvx run --env-file=../.env -- deno run --allow-net --allow-run --allow-read --allow-env --watch cli/deno.ts --debug" ,
15- "build" : " deno task generate-version && deno task copy-frontend && deno compile --allow-net --allow-run --allow-read --allow-env --include ./dist/static --output ../dist/claude-code-webui cli/deno.ts" ,
14+ "dev" : " deno task generate-version && dotenvx run --env-file=../.env -- deno run --allow-net --allow-run --allow-read --allow-write=./.streaming --allow- env --watch cli/deno.ts --debug" ,
15+ "build" : " deno task generate-version && deno task copy-frontend && deno compile --allow-net --allow-run --allow-read --allow-write=./.streaming --allow- env --include ./dist/static --output ../dist/claude-code-webui cli/deno.ts" ,
1616 "format" : " deno fmt" ,
1717 "lint" : " deno lint" ,
1818 "check" : " deno check" ,
Original file line number Diff line number Diff line change 33 * Handles writing, reading, and cleaning up streaming response files
44 */
55
6+ import process from "node:process" ;
67import type { Runtime } from "../runtime/types.ts" ;
78import type { StreamResponse } from "../../shared/types.ts" ;
89import { RequestStatus } from "../../shared/types.ts" ;
@@ -40,17 +41,21 @@ export function stopCleanupInterval() {
4041}
4142
4243/**
43- * Get the streaming directory path for a project
44+ * Get the streaming directory path for a project relative to current working directory
4445 */
4546export function getStreamingDir (
4647 encodedProjectName : string ,
4748 runtime : Runtime ,
4849) : string {
49- const homeDir = runtime . getEnv ( "HOME" ) ;
50- if ( ! homeDir ) {
51- throw new Error ( "HOME environment variable not found" ) ;
50+ // Check if there's a custom streaming base directory set in environment
51+ const customDir = runtime . getEnv ( "CLAUDE_STREAMING_DIR" ) ;
52+ if ( customDir ) {
53+ return `${ customDir } /${ encodedProjectName } ` ;
5254 }
53- return `${ homeDir } /.claude/projects/${ encodedProjectName } /streaming` ;
55+
56+ // Otherwise, use current working directory
57+ const cwd = process . cwd ( ) ;
58+ return `${ cwd } /.streaming/${ encodedProjectName } ` ;
5459}
5560
5661/**
You can’t perform that action at this time.
0 commit comments