feat: add cc-switch integration and modal for token management

- Introduced a new CCSwitchModal component for managing CCSwitch configurations.
- Updated the TokensPage to include functionality for opening the CCSwitch modal.
- Enhanced the useTokensData hook to handle CCSwitch URLs and trigger the modal.
- Modified chat settings to include a new "CC Switch" entry.
- Updated sidebar logic to skip certain links based on the new configuration.
This commit is contained in:
CaIon
2026-03-01 23:23:20 +08:00
parent 6b9296c7ce
commit 96264d2f8f
12 changed files with 6361 additions and 992 deletions

View File

@@ -251,9 +251,9 @@ const SiderBar = ({ onNavigate = () => {} }) => {
for (let key in chats[i]) {
let link = chats[i][key];
if (typeof link !== 'string') continue; // 确保链接是字符串
if (link.startsWith('fluent')) {
if (link.startsWith('fluent') || link.startsWith('ccswitch')) {
shouldSkip = true;
break; // 跳过 Fluent Read
break;
}
chat.text = key;
chat.itemKey = 'chat' + i;