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
5 changes: 4 additions & 1 deletion packages/kilo-vscode/src/speech-to-text/capture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ function run(args) {
const error = Ref()
const url = $.NSURL.fileURLWithPath(args[0])
const recorder = $.AVAudioRecorder.alloc.initWithURLSettingsError(url, settings, error)
if (!recorder || !recorder.prepareToRecord || !recorder.record) throw new Error("Could not start recording")
if (!recorder || !recorder.prepareToRecord || !recorder.record) {
const description = error[0] && error[0].localizedDescription
throw new Error(description ? description.js : "Could not start recording")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SUGGESTION: Missing changeset for a user-facing diagnostics change

This PR changes the error text users see when native macOS speech capture fails to start, which is user-visible behavior in the VS Code extension. Per the repo's changeset guidance, user-facing fixes should ship with a .changeset/*.md entry (e.g. a patch bump for kilo-code) so the improvement shows up in release notes.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fine for now

}
console.log("ready")
$.NSFileHandle.fileHandleWithStandardInput.readDataToEndOfFile
recorder.stop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe("macCaptureArgs", () => {
expect(args[3]).toContain("numberWithDouble(16000), $.AVSampleRateKey")
expect(args[3]).toContain("numberWithInt(1), $.AVNumberOfChannelsKey")
expect(args[3]).toContain("numberWithInt(24000), $.AVEncoderBitRateKey")
expect(args[3]).toContain("error[0] && error[0].localizedDescription")
expect(args[3]).toContain('console.log("ready")')
})
})
Expand Down
Loading