Repository navigation
feat: improve clipboard shelf and support Zhipu API endpoints - #1
Merged
Merged
Conversation
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.
Summary
This PR combines two improvements, kept in separate commits for review:
https://open.bigmodel.cn/api/coding/paas/v4, plus Coding Plan and standard BigModel presets.Clipboard changes
The new layout request is restricted to the bundled clipboard extension. Existing one-argument thumbnail callers keep the 96 px default, and image access retains the existing clipboard permission check.
Model endpoint fix
Previously, only a
/v1suffix was recognized, so a Zhipu/v4base became/v4/v1/chat/completions.The builder now:
/chat/completionsor/messagesendpoints./v1,/v3,/v4, and/v1beta, appending only the API method path./v1/...fallback for unversioned bases, including existing DeepSeek, OpenRouter and Anthropic-compatible providers.Validation performed locally
./scripts/test-model-endpoints.sh— 25 checks passed, compiling the production endpoint builder; no network calls, model keys or persisted settings../scripts/test-clipboard.sh— 1200×466 light fixture; 57 PASS checks (including shelf geometry)../scripts/test-clipboard.sh 1200 466 --dark— 57 PASS checks../scripts/test-clipboard.sh 420 268— 56 PASS checks../scripts/test-clipboard.sh 420 268 --dark— 56 PASS checks../scripts/bundle.sh release --universal— arm64 + x86_64 development bundle.SPOTCAT_CHANNEL=release ./scripts/bundle.sh release --universal— arm64 + x86_64 release-channel bundle, matching the existing CI build command.codesign --verify --deep --stricton both resulting ad-hoc-signed bundles.git diff --checkand candidate-file scan for credentials, private keys and personal absolute paths.WebKit checks use synthetic in-memory records and mocked clipboard APIs. They cover card/list persistence, large-image geometry, clicked-card action targeting, duplicate prevention, feedback/error paths, keyboard navigation, filters, preview/search races, injection safety, clear confirmation, and 1,000-entry rendering. They do not exercise real cross-application paste or live provider authentication. Physical multi-monitor placement, Accessibility permission prompts and real cross-app paste remain manual integration checks; no claim of those being covered by the fixtures is intended.
Endpoint regression checks are also added to the existing CI workflow. Reproduction details and bridge behavior are documented in
docs/clipboard-shelf.md. Screenshots are not attached to this submission.Scope / privacy
No API keys, clipboard history, model settings, local signing identities/certificates, application backups or build artifacts are included. This PR does not change signing/install/release scripts, application identifiers, or update behavior. Local-only certificate/installation changes have deliberately been excluded.