* fix(cli,vscode): prevent infinite loading in commit message generation
Add timeout-based AbortController to both server-side LLM stream (30s)
and client-side HTTP request (35s) so the SCM progress spinner cannot
hang indefinitely. Make the VS Code progress indicator cancellable so
users can abort manually. Also fix outdated test mocks that referenced
the removed getHttpClient API instead of the current SDK getClient.
* fix(cli,vscode): consume stream explicitly to prevent infinite loading
Replace `await stream.text` with `for await (chunk of stream.textStream)`
so that stream-level errors surface immediately instead of leaving the
promise hanging indefinitely. With some providers and Vercel AI SDK
versions, the `.text` promise never resolves when the underlying stream
errors out early, causing the spinner to load forever (fixes#7345).
Add a catch block that distinguishes timeout aborts from other errors
and re-throws with a human-readable message (partially addresses #6568).
In the VS Code extension, log the actual error in the getClient catch
block instead of silently discarding it.
---------
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
- Use trimEnd() instead of trim() in git() to preserve leading whitespace
in porcelain output (fixes status parsing for ' M file' lines)
- Remove unused 'untracked' from FileChange status union
- Use repository.rootUri.fsPath instead of workspaceFolders[0]
- Add explicit null-check for client after try/catch
- Fix test mocks: add isActive/activate, use mockImplementation to throw,
fix expected error message to match production code
The mockGitContext variable was declared without a type annotation,
causing TypeScript to infer a narrow type from the initial assignment
(status: "modified"). This made reassignment with status: "added"
fail with TS2322. Adding the GitContext type allows all valid status
values.