Skip to content

Ask where to send code instead of guessing - #338

Merged
jbearak merged 3 commits into
mainfrom
t3/send-target-ask
Oct 31, 2026
Merged

jbearak merged 3 commits into
mainfrom
t3/send-target-ask

Conversation

@jbearak

@jbearak jbearak commented Oct 31, 2026

Copy link
Copy Markdown
Owner

By default (auto), Sight picked where code goes and never asked. Local macOS and Windows sent code to the Stata app, so most people never learned the Stata pane exists. The choice is a personal one; Sight should ask once and remember.

sight.sendToStata.target is now ask (default), integrated or external. Under ask, the first send in a VS Code window shows a menu:

  • Stata pane or Stata app for this session;
  • Always use the Stata pane or Always use the Stata app, saved in user settings;
  • Read more…, which opens the new "Choosing where code goes" docs and then shows the menu again.

Escape cancels that send. Remote sessions and Linux, where only the pane works, use it without asking. auto is still accepted and means ask.

Two other changes:

  • New command, "Sight: Choose Where to Send Code": reopens the menu. Once the setting has chosen, it offers to switch or to go back to asking.
  • When a workspace setting overrides an Always choice, Sight says so and uses the choice for this session.

Stacked on #337 (Windows console); review that first.

Proof:

  • In a real VS Code extension host on macOS, driving the actual quick pick with VS Code's keyboard commands:
    • the default reads ask;
    • Escape cancelled without saving;
    • picking "Always use the Stata app" wrote external to user settings;
    • the command's "Ask each session" cleared it.
  • Unit tests cover the menu logic. Integration tests cover auto/ask asking once and the workspace-override case, which fails without its fix.
  • bun run typecheck, bun run lint and bun run check:line-endings pass. bun test ./tests passes except the help-topic-coverage tests, which need a local Stata install.

Reviewed with sol-loop: 2 rounds with gpt-6.1-sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code (T3 Code).

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 64 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: a83a063e-f648-45e4-8f76-8ba46e9cdfbb
Commits

Reviewing files that changed from the base of the PR and between 5b1d3c4 and f3955b1.

Files selected for processing: 10
  • client/package.json
  • client/src/send-to-stata/cd-context.ts
  • client/src/send-to-stata/commands.ts
  • client/src/send-to-stata/target-choice-core.ts
  • client/src/send-to-stata/target-choice.ts
  • docs/send-to-stata.md
  • tests/integration/send-to-stata-app-temp-file-lifecycle.test.ts
  • tests/integration/send-to-stata-integrated-terminal.test.ts
  • tests/unit/send-to-stata/target-choice-core.test.ts
  • tests/vscode-mock-shared-exports.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Base automatically changed from t3/windows-stata-com-console to main October 31, 2026 17:18
sight.sendToStata.target gets a new default, ask, replacing auto
(still accepted, meaning the same). On local macOS and Windows the
first send in a window shows a menu: the Stata pane or the Stata
app, for this session or saved for every session, plus Read more.
Remote sessions and Linux, where only the pane works, use it
without asking. Sight: Choose Where to Send Code reopens the menu,
and once the setting chose, offers switching or asking again.
@jbearak
jbearak force-pushed the t3/send-target-ask branch from 8928f4a to f3955b1 Compare October 31, 2026 17:18
@jbearak
jbearak merged commit a69f5d7 into main Oct 31, 2026
12 checks passed
@jbearak
jbearak deleted the t3/send-target-ask branch October 31, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant