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.
🤖 Generated by Copilot at 0bc75a0
Summary
🔧🐛🌐
This pull request refactors the code to remove the OpenAI configuration from the system status and store it as a separate system setting. It also simplifies the UI and the global state, fixes a typo, and modifies a translation. The files affected are
server/system.go
,web/src/components/Header.tsx
,web/src/components/Settings/SystemSection.tsx
,web/src/store/module/global.ts
,api/system.go
,web/src/components/AskAIDialog.tsx
,web/src/locales/zh-Hans.json
, andweb/src/store/reducer/global.ts
.Walkthrough
SystemSection
component to use a separate state variable for OpenAI configuration and update the fetching, saving, and rendering logic accordingly (link, link, link, link, link, link, link, link)Header
component to always show theheader-ask-ai
button and remove unused dependencies and variables (link, link, link, link)AskAIDialog
component that caused a missing closing tag (link)