mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
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:
parent
19ef74a4a6
commit
b76fc17794
75 changed files with 5863 additions and 3733 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue