feat: refactor API key configuration and enhance application initialization

- Renamed `check_environment` to `check_api_key_configured` for clarity, simplifying the API key validation logic.
- Removed the blocking behavior of the API key check during application startup, allowing the app to run while providing a prompt for configuration.
- Updated `LocalAgentApp` to accept an `api_configured` parameter, enabling conditional messaging for API key setup.
- Enhanced the `SandboxRunner` to support backup management and improved execution result handling with detailed metrics.
- Integrated data governance strategies into the `HistoryManager`, ensuring compliance and improved data management.
- Added privacy settings and metrics tracking across various components to enhance user experience and application safety.
This commit is contained in:
Mimikko-zeus
2026-02-27 14:32:30 +08:00
parent ab5bbff6f7
commit 8a538bb950
58 changed files with 13457 additions and 350 deletions

View File

@@ -396,6 +396,24 @@ class ChatView:
)
self.settings_btn.pack(side=tk.RIGHT, padx=(5, 0))
# 隐私设置按钮(将在外部设置回调)
self.on_show_privacy = None
self.privacy_btn = tk.Button(
btn_container,
text="🔒 隐私",
font=('Microsoft YaHei UI', 10),
bg='#424242',
fg='#a5d6a7',
activebackground='#616161',
activeforeground='#a5d6a7',
relief=tk.FLAT,
padx=10,
pady=3,
cursor='hand2',
command=lambda: self.on_show_privacy() if self.on_show_privacy else None
)
self.privacy_btn.pack(side=tk.RIGHT, padx=(5, 0))
# 历史记录按钮
if self.on_show_history:
self.history_btn = tk.Button(