Skip to content

feat: add built-in free AI service with multi-capability support - #282

Merged
jetyu merged 1 commit into
developfrom
feature/v2.2.2-t
Aug 5, 2026
Merged

jetyu merged 1 commit into
developfrom
feature/v2.2.2-t

Conversation

@jetyu

@jetyu jetyu commented Aug 5, 2026

Copy link
Copy Markdown
Owner
  • Introduced a new built-in AI source named 'Snaptium AI' with capabilities for chat, embedding, and reranking.
  • Implemented a shared constant for the built-in AI source ID, name, base URL, and model mappings.
  • Ensured the built-in source is immutable and cannot be edited or deleted by users.
  • Added functionality to fetch a public API token securely and cache it for the Main process lifetime.
  • Implemented consent handling for the first use of the built-in AI service, requiring user confirmation before sending data.
  • Updated settings normalization to automatically select the built-in source when no user-managed sources exist.
  • Enhanced error handling to provide explicit feedback on built-in service failures without switching providers.
  • Added comprehensive unit tests to validate the built-in AI service functionality and settings normalization.

Summary

Type of Change

  • Bug fix
  • Feature
  • Documentation
  • Refactor
  • Build, CI, or release
  • Other

Related Issues

Closes #

Changes

Testing

  • npm run build:main
  • npm run build:preload
  • npm run typecheck
  • npm run lint
  • npm run test:unit
  • Not run

Checklist

  • I kept this pull request focused and avoided unrelated refactors.
  • I followed the Electron layer boundary: Renderer → Preload/Bridge → Main.
  • I validated IPC input at the boundary when applicable.
  • I avoided any, @ts-ignore, and unnecessary @ts-expect-error.
  • I updated Simplified Chinese locale files for new or changed user-visible UI text.
  • I updated documentation when behavior, setup, or user-facing functionality changed.
  • I considered privacy, security, and user-data impact.

- Introduced a new built-in AI source named 'Snaptium AI' with capabilities for chat, embedding, and reranking.
- Implemented a shared constant for the built-in AI source ID, name, base URL, and model mappings.
- Ensured the built-in source is immutable and cannot be edited or deleted by users.
- Added functionality to fetch a public API token securely and cache it for the Main process lifetime.
- Implemented consent handling for the first use of the built-in AI service, requiring user confirmation before sending data.
- Updated settings normalization to automatically select the built-in source when no user-managed sources exist.
- Enhanced error handling to provide explicit feedback on built-in service failures without switching providers.
- Added comprehensive unit tests to validate the built-in AI service functionality and settings normalization.
@jetyu
jetyu merged commit b80f799 into develop Aug 5, 2026
5 checks passed
@jetyu
jetyu deleted the feature/v2.2.2-t branch August 9, 2026 13:38
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