-
Notifications
You must be signed in to change notification settings - Fork 785
windows, have a new "local" conn option for Git Bash if installed #2666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4d93cbc
d2045b4
b63d5a9
be09e31
6abf26a
7631a66
16f2ea0
91e397c
c1fe7b1
fb4c63b
3ee15f5
d0a3534
b8ad630
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -54,6 +54,17 @@ tasks: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WCLOUD_ENDPOINT: "https://api-dev.waveterm.dev/central" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WCLOUD_WS_ENDPOINT: "wss://wsapi-dev.waveterm.dev/" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| electron:winquickdev: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| desc: Run the Electron application via the Vite dev server (quick dev - Windows amd64 only, no generate, no wsh). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cmd: npm run dev | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| deps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - npm:install | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - build:backend:quickdev:windows | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WAVETERM_ENVFILE: "{{.ROOT_DIR}}/.env" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WCLOUD_ENDPOINT: "https://api-dev.waveterm.dev/central" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WCLOUD_WS_ENDPOINT: "wss://wsapi-dev.waveterm.dev/" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docs:npm:install: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| desc: Runs `npm install` in docs directory | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| internal: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -186,6 +197,25 @@ tasks: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| generates: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - dist/bin/wavesrv.* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| build:backend:quickdev:windows: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| desc: Build only the wavesrv component for quickdev (Windows amd64 only, no generate, no wsh). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| platforms: [windows] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cmds: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - task: build:server:internal | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| vars: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ARCHS: amd64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GO_ENV_VARS: CC="zig cc -target x86_64-windows-gnu" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| deps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - go:mod:tidy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sources: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "cmd/server/*.go" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "pkg/**/*.go" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "pkg/**/*.json" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "pkg/**/*.sh" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "tsunami/**/*.go" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| generates: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - dist/bin/wavesrv.x64.exe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+200
to
+218
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # Find Taskfile.yml
find . -name "Taskfile.yml" -o -name "Taskfile.yaml" | head -20Repository: wavetermdev/waveterm Length of output: 78 🏁 Script executed: # Get file size to understand what we're working with
wc -l ./Taskfile.ymlRepository: wavetermdev/waveterm Length of output: 82 🏁 Script executed: # Read lines 200-218 (build:backend:quickdev:windows)
sed -n '200,218p' ./Taskfile.yml
# Read around Line 250 (build:server:internal)
sed -n '245,260p' ./Taskfile.yml
# Find build:server:windows
grep -n "build:server:windows" ./Taskfile.ymlRepository: wavetermdev/waveterm Length of output: 1443 🏁 Script executed: # Read the build:server:windows task definition
sed -n '219,250p' ./Taskfile.ymlRepository: wavetermdev/waveterm Length of output: 1741 🏁 Script executed: # Look for any Task-related configuration files or comments about shell behavior
grep -r "shell\|cmd\.exe\|PowerShell\|bash" ./Taskfile.yml | head -20
# Check for any .taskfiles or includes
ls -la | grep -i task
# Look for any GitHub Actions or CI configuration that might reveal how Task is used on Windows
find . -name "*.yml" -o -name "*.yaml" | grep -E "(workflow|action|ci|github)" | head -10Repository: wavetermdev/waveterm Length of output: 2122 🏁 Script executed: # Check GitHub workflows for Windows builds
ls -la ./.github/workflows/
# Look for Windows-specific build workflows
grep -l "windows\|Windows" ./.github/workflows/*.ymlRepository: wavetermdev/waveterm Length of output: 945 🏁 Script executed: # Check build-helper.yml for Windows task execution
cat -n ./.github/workflows/build-helper.yml | grep -A 10 -B 10 "windows\|Windows\|task"Repository: wavetermdev/waveterm Length of output: 9708 🏁 Script executed: # Search for any issues or comments related to GO_ENV_VARS or Windows build issues
grep -n "GO_ENV_VARS\|shell\|zig cc" ./Taskfile.yml | head -30
# Look for any recent changes or git history comments
git log --oneline -20 2>/dev/null | head -10Repository: wavetermdev/waveterm Length of output: 2605 🏁 Script executed: # Search for Task documentation or any comments about shell behavior
grep -rn "task\|Task\|shell" . --include="*.md" --include="*.txt" 2>/dev/null | grep -i "windows\|shell\|bash" | head -20
# Check README for build instructions
head -100 ./README.md 2>/dev/null || echo "No README"
# Look for any task-related documentation
find . -name "*[Tt]ask*" -type f 2>/dev/null | grep -v node_modules | grep -v ".git"Repository: wavetermdev/waveterm Length of output: 6905 🏁 Script executed: # Check BUILD.md for build instructions
cat ./BUILD.md | head -150
# Look for any Task-related information in the repo
grep -rn "sh:" ./Taskfile.yml | head -20Repository: wavetermdev/waveterm Length of output: 5129 🏁 Script executed: # Search for any usage of build:backend:quickdev:windows
grep -rn "build:backend:quickdev:windows\|quickdev" . --include="*.yml" --include="*.yaml" --include="*.md" 2>/dev/null
# Look for any issue reports or comments about Windows builds
grep -rn "windows\|Windows" ./.github/workflows/ | grep -i "task\|build" | head -20Repository: wavetermdev/waveterm Length of output: 3279 🏁 Script executed: # Search for any GitHub issues or error reports related to Windows build
git log --all --grep="windows\|Windows\|GO_ENV_VARS" --oneline 2>/dev/null | head -20
# Check if there are any recent changes to the Taskfile
git log --oneline -30 -- Taskfile.yml 2>/dev/null
# Look for any comments or TODOs in the Taskfile
grep -n "TODO\|FIXME\|BUG\|HACK\|NOTE" ./Taskfile.ymlRepository: wavetermdev/waveterm Length of output: 1370 🏁 Script executed: # Check commit e6b4e36 for the Windows build error fix
git show e6b4e36 --stat 2>/dev/null | head -50
# Also check commit 79210f0
git show 79210f0 2>/dev/null | head -100Repository: wavetermdev/waveterm Length of output: 1226 🏁 Script executed: # Look for any GitHub issues mentioning the build task or quickdev
find ./.github -name "*.md" -o -name "*.txt" | xargs grep -l "quickdev\|GO_ENV_VARS" 2>/dev/null
# Check if there are any test workflows
ls -la ./.github/workflows/
# Look for any recent issues or PRs
git log --all --oneline --grep="quickdev\|GO_ENV_VARS\|backend:quickdev" 2>/dev/null | head -20Repository: wavetermdev/waveterm Length of output: 792 🏁 Script executed: # Get the exact structure of build:server:internal more carefully
sed -n '245,260p' ./Taskfile.yml | cat -ARepository: wavetermdev/waveterm Length of output: 773 🏁 Script executed: # Search for electron:winquickdev usage in workflows or documentation
grep -rn "electron:winquickdev\|build:backend:quickdev:windows" ./.github/ ./README.md ./BUILD.md 2>/dev/nullRepository: wavetermdev/waveterm Length of output: 46 Use
build:backend:quickdev:windows:
desc: Build only the wavesrv component for quickdev (Windows amd64 only, no generate, no wsh).
platforms: [windows]
cmds:
- task: build:server:internal
vars:
ARCHS: amd64
- GO_ENV_VARS: CC="zig cc -target x86_64-windows-gnu"
+ GO_ENV_VARS:
+ sh: echo 'CC="zig cc -target x86_64-windows-gnu"'📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| build:server:windows: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| desc: Build the wavesrv component for Windows platforms (only generates artifacts for the current architecture). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| platforms: [windows] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| // Copyright 2025, Command Line Inc. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| import { RpcApi } from "@/app/store/wshclientapi"; | ||
| import { TabRpcClient } from "@/app/store/wshrpcutil"; | ||
| import { isWindows } from "@/util/platformutil"; | ||
| import { atom, type Atom, type PrimitiveAtom } from "jotai"; | ||
| import { globalStore } from "./jotaiStore"; | ||
|
|
||
| class ConnectionsModel { | ||
| private static instance: ConnectionsModel; | ||
| gitBashPathAtom: PrimitiveAtom<string> = atom("") as PrimitiveAtom<string>; | ||
| hasGitBashAtom: Atom<boolean>; | ||
|
|
||
| private constructor() { | ||
| this.hasGitBashAtom = atom((get) => { | ||
| if (!isWindows()) { | ||
| return false; | ||
| } | ||
| const path = get(this.gitBashPathAtom); | ||
| return path !== ""; | ||
| }); | ||
| this.loadGitBashPath(); | ||
| } | ||
|
|
||
| static getInstance(): ConnectionsModel { | ||
| if (!ConnectionsModel.instance) { | ||
| ConnectionsModel.instance = new ConnectionsModel(); | ||
| } | ||
| return ConnectionsModel.instance; | ||
| } | ||
|
|
||
| async loadGitBashPath(rescan: boolean = false): Promise<void> { | ||
| if (!isWindows()) { | ||
| return; | ||
| } | ||
| try { | ||
| const path = await RpcApi.FindGitBashCommand(TabRpcClient, rescan, { timeout: 2000 }); | ||
| globalStore.set(this.gitBashPathAtom, path); | ||
| } catch (error) { | ||
| console.error("Failed to find git bash path:", error); | ||
| globalStore.set(this.gitBashPathAtom, ""); | ||
| } | ||
| } | ||
|
|
||
| getGitBashPath(): string { | ||
| return globalStore.get(this.gitBashPathAtom); | ||
| } | ||
| } | ||
|
|
||
| export { ConnectionsModel }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gate
electron:winquickdevto Windows to prevent accidental use on other platforms.The task description explicitly states "Windows amd64 only", but it lacks a
platforms: [windows]guard. Add it to match the pattern used by its dependencybuild:backend:quickdev:windowsand other platform-specific tasks in the file.electron:winquickdev: desc: Run the Electron application via the Vite dev server (quick dev - Windows amd64 only, no generate, no wsh). + platforms: [windows] cmd: npm run dev deps: - npm:install - build:backend:quickdev:windows🤖 Prompt for AI Agents