Skip to content

Enhance favorites, settings management, and add built-in AI service - #283

Merged
jetyu merged 7 commits into
previewfrom
develop
Aug 5, 2026
Merged

Enhance favorites, settings management, and add built-in AI service#283
jetyu merged 7 commits into
previewfrom
develop

Conversation

@jetyu

@jetyu jetyu commented Aug 5, 2026

Copy link
Copy Markdown
Owner

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.

jetyu and others added 7 commits July 29, 2026 11:12
## 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.

---------

Co-authored-by: Jet <jetyu91@163.com>
## 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.

---------

Co-authored-by: Jet <jetyu91@163.com>
## 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.

---------

Co-authored-by: Jet <jetyu91@163.com>
## 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.

---------

Co-authored-by: Jet <jetyu91@163.com>
- 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.

Co-authored-by: Jet <jetyu91@163.com>
@jetyu
jetyu merged commit f97c8e9 into preview Aug 5, 2026
6 checks passed
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