Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@ debug-ui-main-process:
npm install && \
npm run start-gui-debug

# Package the desktop app locally for testing (macOS)
# Applies ad-hoc code signing with entitlements (needed for mic access, etc.)
package-ui:
@just release-binary
@echo "Packaging desktop app..."
cd ui/desktop && npm install && npm run package
@echo "Signing with entitlements..."
codesign --force --deep --sign - --entitlements ui/desktop/entitlements.plist ui/desktop/out/Goose-darwin-arm64/Goose.app
@echo "Done! Launch with: open ui/desktop/out/Goose-darwin-arm64/Goose.app"
Comment on lines +172 to +173
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package-ui hard-codes the output path to out/Goose-darwin-arm64/Goose.app, which will fail on Intel Macs (and if electron-forge output naming changes); consider deriving the directory from uname -m/an env var or using a glob to locate the packaged .app.

Suggested change
codesign --force --deep --sign - --entitlements ui/desktop/entitlements.plist ui/desktop/out/Goose-darwin-arm64/Goose.app
@echo "Done! Launch with: open ui/desktop/out/Goose-darwin-arm64/Goose.app"
APP_PATH=$(printf '%s\n' ui/desktop/out/Goose-darwin-*/Goose.app | head -n 1) && \
if [ ! -d "$APP_PATH" ]; then echo "Error: packaged app not found under ui/desktop/out"; exit 1; fi && \
codesign --force --deep --sign - --entitlements ui/desktop/entitlements.plist "$APP_PATH"
@echo "Done! Launch with: open $(printf '%s\n' ui/desktop/out/Goose-darwin-*/Goose.app | head -n 1)"

Copilot uses AI. Check for mistakes.

# Run UI with alpha changes
run-ui-alpha:
@just release-binary
Expand Down
2 changes: 2 additions & 0 deletions crates/goose/src/dictation/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ pub async fn transcribe_with_provider(
anyhow::bail!("Invalid API key");
} else if status == 429 || error_text.contains("quota") {
anyhow::bail!("Rate limit exceeded");
} else if error_text.contains("too short") {
return Ok(String::new());
} else {
anyhow::bail!("API error: {}", error_text);
}
Expand Down
5 changes: 3 additions & 2 deletions ui/desktop/src/hooks/useAudioRecorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ const MIN_SPEECH_MS = 200;
// without clipping early speech onsets. Determined empirically for 16kHz mono input.
const RMS_THRESHOLD = 0.015;

// Import the worklet module - Vite will handle this correctly
const WORKLET_URL = new URL('../audio-capture-worklet.js', import.meta.url).href;
// Resolve worklet URL at runtime from window.location so it works under both
// the dev server (http://localhost) and packaged builds (file://).
const WORKLET_URL = new URL('audio-capture-worklet.js', window.location.href.split('#')[0]).href;

function encodeWav(samples: Float32Array, sampleRate: number): ArrayBuffer {
const buf = new ArrayBuffer(44 + samples.length * 2);
Expand Down
Loading