Chore/upgrade (#646)

* docs: deps

* Update dependencies and type usage for AI features

Upgraded multiple dependencies in package.json and pnpm-lock.yaml, including @ai-sdk, @mui, react, and others for improved compatibility and performance. Changed type usage from CoreMessage to ModelMessage in mockOpenAI.test.ts to align with updated ai package. No functional changes to application logic.

* feat: i18n

* feat: test oauth login and use PKCE

* fix: use ollama-ai-provider-v2

* test: github and mock oauth2 login

* test: gitea login

* Refactor context menu cleanup and error message

Moved context menu cleanup for OAuth window to a single closed event handler in Authentication service. Simplified error message formatting in ContextService for missing keys.

* lint: AI fix

* Add tsx as a dev dependency and update scripts

Replaced usage of 'pnpm dlx tsx' with direct 'tsx' command in development and test scripts for improved reliability. Added 'tsx' to devDependencies in package.json.
This commit is contained in:
lin onetwo 2025-10-23 23:42:06 +08:00 committed by GitHub
parent 19ef74a4a6
commit b76fc17794
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
75 changed files with 5863 additions and 3733 deletions

View file

@ -5,6 +5,7 @@ import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { ListItemText } from '../ListItem';
import { CustomServerTokenForm } from './CustomServerTokenForm';
import { GitTokenForm } from './GitTokenForm';
const Container = styled('div')`
@ -83,23 +84,29 @@ export function TokenForm({ storageProvider, storageProviderSetter }: Props): Re
value={currentTab}
aria-label='Vertical tabs example'
>
<Tab label='GitHub' value={SupportedStorageServices.github} />
<Tab label='GitLab' value={SupportedStorageServices.gitlab} />
<Tab label='Gitee' value={SupportedStorageServices.gitee} />
<Tab label='GitHub' value={SupportedStorageServices.github} data-testid='github-tab' />
<Tab label='Codeberg' value={SupportedStorageServices.codeberg} data-testid='codeberg-tab' />
<Tab label='Gitea.com' value={SupportedStorageServices.gitea} data-testid='gitea-tab' />
<Tab label='Custom Server' value={SupportedStorageServices.testOAuth} data-testid='custom-server-tab' />
</Tabs>
{currentTab === SupportedStorageServices.github && (
<TabPanel>
<GitTokenForm storageService={SupportedStorageServices.github} />
</TabPanel>
)}
{currentTab === SupportedStorageServices.gitlab && (
{currentTab === SupportedStorageServices.codeberg && (
<TabPanel>
<GitTokenForm storageService={SupportedStorageServices.gitlab} />
<GitTokenForm storageService={SupportedStorageServices.codeberg} />
</TabPanel>
)}
{currentTab === SupportedStorageServices.gitee && (
{currentTab === SupportedStorageServices.gitea && (
<TabPanel>
Gitee OAuth2
<GitTokenForm storageService={SupportedStorageServices.gitea} />
</TabPanel>
)}
{currentTab === SupportedStorageServices.testOAuth && (
<TabPanel>
<CustomServerTokenForm />
</TabPanel>
)}
</TabsContainer>