Repository navigation
feat(chatgpt): add subscription sign-in and Ask Glance - #12
Open
benvinegar wants to merge 8 commits into
Open
benvinegar wants to merge 8 commits into
benvinegar wants to merge 8 commits into
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Users can now sign in with ChatGPT and Ask Glance to edit or explain a screenshot using their plan. The AI toolbar button / ⌘K (Ctrl+K on Linux) opens a single compact control row with prompt, model, Run/Stop, and close. Requests such as “pixelate the emails and highlight the error” can inspect the image, crop/resize it, and add or refine editable annotations and backdrops. Completed edits apply together with one Undo; cancellation, failed/incomplete requests, and stale document/account results discard the draft.
This builds on #11 and targets
codex/copy-as-ocr. Local Copy as OCR remains the initial OCR choice; signing in or typing a prompt sends no screenshot. Run explicitly sends the annotated image, metadata, and prompt to OpenAI. ChatGPT OCR is a separate opt-in setting.Integration contract: ChatGPT plan usage in open-source apps, including supported tool and state requirements.
Validation
cargo fmt --checkcargo clippy --all-targets --locked -- -D warningscargo test --locked: 192 passed, 19 opt-in tests skipped. New synthetic tests cover multi-turn tool execution, reasoning/history replay, revision-scoped IDs, atomic undo/redo, cancel-and-restart worker dispatch, stale operation/account results, partial streams, tool allowlisting, bounds, Unicode prompt input, MCP state, model controls with local OCR, standalone model dropdown placement and Escape dismissal, running activity UI and elapsed state read-back, and minimum-width toolbar layout.GLANCE_CODESIGN_IDENTITY=- ./scripts/bundle.sh debug; installed app untouched.Signed synthetic JWT tests cover signature, issuer, audience, expiry, nonce, and malformed/future not-before claims. Callback, token rotation, private storage, stream completion/limits, shared dispatch, stale account jobs, and sign-out clipboard races are covered. Fixtures contain fictional identities and public verification material; temporary private signing material was discarded.
The OAuth implementation uses patched jsonwebtoken 10.4.0 after reviewing GHSA-h395-gr6q-cpjc. Earlier OSV checks on 2026-10-06 found no matching advisories for the selected jsonwebtoken, aws-lc-rs, aws-lc-sys, and fs2 versions. Ask Glance adds no dependencies. OpenAI preview availability and models depend on the selected account.