This commit is contained in:
centdix
2026-02-22 13:17:34 +00:00
parent 8cdc7d6e9e
commit 0d520f730b
4 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ panes:
focus: true
- command: "[ -f .env.local ] && source .env.local; cd backend && PORT=${BACKEND_PORT:-8000} cargo watch -x run"
split: horizontal
- command: "[ -f .env.local ] && source .env.local; cd frontend && npm install && npm run generate-backend-client && REMOTE=${REMOTE:-http://localhost:${BACKEND_PORT:-8000}} npm run dev -- --port ${FRONTEND_PORT:-3000}"
- command: "[ -f .env.local ] && source .env.local; cd frontend && npm install && npm run generate-backend-client && REMOTE=${REMOTE:-http://localhost:${BACKEND_PORT:-8000}} npm run dev -- --port ${FRONTEND_PORT:-3000} --host 0.0.0.0"
split: vertical
files:
+3 -2
View File
@@ -1,3 +1,4 @@
import { FileSink } from "bun";
import { getTmuxSession } from "./workmux";
interface TerminalSession {
@@ -127,8 +128,8 @@ export async function detach(worktreeName: string): Promise<void> {
export function write(worktreeName: string, data: string): void {
const session = sessions.get(worktreeName);
if (session) {
session.proc.stdin.write(new TextEncoder().encode(data));
if (session && session.proc.stdin) {
(session.proc.stdin as FileSink).write(new TextEncoder().encode(data));
}
}
+1 -1
View File
@@ -93,7 +93,7 @@ function buildSandboxSystemPrompt(env: Record<string, string>): string {
"You are running inside a sandboxed container with full permissions.",
`This worktree is configured with the following ports:`,
`- Backend: port ${backendPort}. Start with: cd backend && PORT=${backendPort} DATABASE_URL=postgres://postgres:changeme@localhost:5432/windmill cargo watch -x run`,
`- Frontend: port ${frontendPort}. Start with: cd frontend && REMOTE=http://localhost:${backendPort} npm run dev -- --port ${frontendPort} --host 0.0.0.0`,
`- Frontend: port ${frontendPort}. Start with: cd frontend && REMOTE=http://localhost:${backendPort} npm run dev -- --port ${frontendPort}`,
];
if (hasR2) {
lines.push(
+3 -3
View File
@@ -3,9 +3,9 @@
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"dev": "vite --host 0.0.0.0",
"build": "vite build",
"preview": "vite preview",
"preview": "vite preview --host 0.0.0.0",
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
@@ -20,4 +20,4 @@
"typescript": "^5.0.0",
"vite": "^6.0.0"
}
}
}