Skip to content

Enhance settings management and add AI service support for v2.2.3 - #290

Merged
jetyu merged 27 commits into
mainfrom
develop
Aug 8, 2026
Merged

Enhance settings management and add AI service support for v2.2.3#290
jetyu merged 27 commits into
mainfrom
develop

Conversation

@jetyu

@jetyu jetyu commented Aug 8, 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 27 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>
- Added AI operation popover in EditorPane.vue to display AI operation options.
- Implemented AI operation handling in useEditorContextMenu.ts, including start, apply, discard, and retry functionalities.
- Enhanced context menu to enable/disable AI actions based on selection and active operations.
- Introduced NoteStorageSettings.vue for managing note storage configurations, including path selection and history version settings.
- Updated SettingsPanel.vue to include NoteStorageSettings and improved UI elements for better accessibility.
- Added styles for AI operation popover and updated settings panel layout for improved user experience.
- Introduced a Translation submenu within Smart Writing for translating selected text into Simplified Chinese, English, Traditional Chinese (Taiwan), Japanese, and Korean.
- Implemented a quick translation target setting in Smart Writing preferences, defaulting to Simplified Chinese.
- Enhanced the editor context menu to include translation actions, allowing users to translate selected text directly.
- Added validation for translation targets to ensure only supported languages are used.
- Updated the editor AI operation lifecycle to accommodate translation requests, preserving document structure and ensuring safe previews before applying changes.
- Extended existing AI prompt presets to include translation prompts and adjusted the payload structure to support target language specifications.
- Centralized action button styles into base.css for consistency.
- Introduced semantic classes: .action-button, .primary, .secondary, and .danger.
- Updated button implementations in various components to use the new styles.
- Removed redundant local styles to streamline button appearance and behavior.
- Ensured primary actions are visually distinct and follow theme colors.
- Maintained specialized styles for non-standard button elements.
… component

- Updated LogSettings.vue to use secondary button style for log directory actions.
- Introduced NoteStorageSettings.vue with options for note storage location, max history versions, snapshot interval, and trash auto-clear settings.
- Updated ShortcutSettings.vue and SoftwareUpdateSettings.vue to apply secondary button styles for reset and update actions.
- Enhanced TrustedHostsConfig.vue with primary button style for adding hosts and improved styling for delete actions.
- Refactored various components to use consistent action button styles across the application.
- Improved user feedback dialogs in HistoryDialog.vue and NotePropertiesDialog.vue with action button styles.
- Updated NotebookAppearanceDialog.vue to use action button styles for reset actions.
@jetyu
jetyu merged commit 7505a3c into main Aug 8, 2026
2 checks passed
@jetyu
jetyu deleted the develop branch August 8, 2026 14:28
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