Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
server-checks:
name: server-checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run server checks
run: bun run check:server

adapter-tests:
name: adapter-tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install adapter dependencies
working-directory: adapters
run: bun install

- name: Run adapter tests
working-directory: adapters
run: bun test
53 changes: 53 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CodeQL Advanced

on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

permissions:
actions: read
contents: read
security-events: write

concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true

jobs:
codeql:
name: codeql
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Initialize CodeQL
uses: github/codeql-action/init-action@v3
with:
languages: javascript
typescript
build-mode: manual
ram: 4096

- name: Build
run: |
bun run build || true

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze-action@v3
with:
category: "/language:javascript-typescript"
71 changes: 71 additions & 0 deletions .github/workflows/dependency-updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Dependency Updates

on:
schedule:
- cron: '0 0 * * MON'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: dependency-updates-${{ github.ref }}
cancel-in-progress: true

jobs:
check-outdated:
name: check-outdated
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Check outdated packages (root)
run: bun outdated || true

- name: Install adapter dependencies
working-directory: adapters
run: bun install

- name: Check outdated packages (adapters)
working-directory: adapters
run: bun outdated || true

npm-audit:
name: npm-audit
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run npm audit
run: npm audit --json > /tmp/audit-report.json || true

- name: Show audit summary
run: npm audit || true

- name: Fail on high severity vulnerabilities
run: |
HIGH=$(npm audit --audit-level=high 2>&1; echo "exit:$?")
echo "$HIGH"
26 changes: 26 additions & 0 deletions .github/workflows/lock-closed-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lock Closed Issues

on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:

permissions:
issues: write

concurrency:
group: lock-closed-issues
cancel-in-progress: true

jobs:
lock-closed-issues:
name: lock-closed-issues
runs-on: ubuntu-latest
steps:
- name: Lock closed issues
uses: dessant/lock-threads@v5
with:
github-token: ${{ github.token }}
issue-inactive-days: '30'
pr-inactive-days: '90'
process-only: 'issues, prs'
42 changes: 42 additions & 0 deletions .github/workflows/sweep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Sweep

on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:

permissions:
issues: write
pull-requests: write

concurrency:
group: sweep
cancel-in-progress: true

jobs:
sweep:
name: sweep
runs-on: ubuntu-latest
steps:
- name: Stale issues and PRs
uses: actions/stale@v9
with:
days-before-issue-stale: 60
days-before-issue-close: 7
stale-issue-label: stale
stale-issue-message: >
This issue is stale because it has been open for 60 days with no
activity. If this is still an issue, please add a comment with an
update. Otherwise this issue will be closed in 7 days.
close-issue-message: This issue was closed because it has been stalled for 7 days with no activity.
days-before-pr-stale: 45
days-before-pr-close: 10
stale-pr-label: stale
stale-pr-message: >
This pull request is stale because it has been open for 45 days with
no activity. If you are still working on this, please add a comment
with an update. Otherwise this pull request will be closed in 10 days.
close-pr-message: This pull request was closed because it has been stalled for 10 days with no activity.
operations-per-run: 100
exempt-all-milestones: true
exempt-all-assignees: true
2 changes: 2 additions & 0 deletions desktop/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,8 @@ export const en = {
'settings.providers.toolSearchEnabled': 'Enable Tool Search',
'settings.providers.toolSearchDesc': 'Load MCP and deferred tools on demand to reduce initial tool schema tokens. Disable it for weak models or providers that reject tool references.',
'settings.providers.toolSearchUnsupported': 'Only Anthropic Messages providers support Tool Search here. OpenAI proxy formats keep full tool schemas available.',
'settings.providers.availableModels': 'Available models — click to select',
'settings.providers.clickToSelectModel': 'Click to use this model as the main model',

// Settings > Permissions
'settings.permissions.title': 'Permission Mode',
Expand Down
2 changes: 2 additions & 0 deletions desktop/src/i18n/locales/jp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,8 @@ export const jp: Record<TranslationKey, string> = {
'settings.providers.toolSearchEnabled': 'Tool Search を有効にする',
'settings.providers.toolSearchDesc': 'MCP と遅延ツールを必要に応じて読み込み、初回のツール schema トークンを減らします。弱いモデルや tool_reference を拒否するプロバイダーでは無効にできます。',
'settings.providers.toolSearchUnsupported': 'ここでは Anthropic Messages 形式のプロバイダーのみ Tool Search をサポートします。OpenAI プロキシ形式では完全なツール schema を維持します。',
'settings.providers.availableModels': '利用可能なモデル — クリックして選択',
'settings.providers.clickToSelectModel': 'クリックしてこのモデルを使用',

// Settings > Permissions
'settings.permissions.title': '権限モード',
Expand Down
2 changes: 2 additions & 0 deletions desktop/src/i18n/locales/kr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,8 @@ export const kr: Record<TranslationKey, string> = {
'settings.providers.toolSearchEnabled': 'Tool Search 사용',
'settings.providers.toolSearchDesc': 'MCP와 지연 도구를 필요할 때 로드해 초기 도구 schema 토큰을 줄입니다. 약한 모델이나 tool_reference를 거부하는 공급자에서는 끌 수 있습니다.',
'settings.providers.toolSearchUnsupported': '여기서는 Anthropic Messages 형식 공급자만 Tool Search를 지원합니다. OpenAI 프록시 형식은 전체 도구 schema를 유지합니다.',
'settings.providers.availableModels': '사용 가능한 모델 — 클릭하여 선택',
'settings.providers.clickToSelectModel': '클릭하여 이 모델을 주 모델로 사용',

// Settings > Permissions
'settings.permissions.title': '권한 모드',
Expand Down
2 changes: 2 additions & 0 deletions desktop/src/i18n/locales/zh-TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,8 @@ export const zh: Record<TranslationKey, string> = {
'settings.providers.toolSearchEnabled': '啟用 Tool Search',
'settings.providers.toolSearchDesc': '按需載入 MCP 和延遲工具,減少首輪工具 schema token。弱模型或不支援 tool_reference 的服務商可以關閉。',
'settings.providers.toolSearchUnsupported': '目前僅 Anthropic Messages 格式支援 Tool Search;OpenAI 代理格式會保留完整工具 schema。',
'settings.providers.availableModels': '可用模型 — 點擊選擇',
'settings.providers.clickToSelectModel': '點擊使用此模型作為主模型',

// Settings > Permissions
'settings.permissions.title': '許可權模式',
Expand Down
2 changes: 2 additions & 0 deletions desktop/src/i18n/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,8 @@ export const zh: Record<TranslationKey, string> = {
'settings.providers.toolSearchEnabled': '启用 Tool Search',
'settings.providers.toolSearchDesc': '按需加载 MCP 和延迟工具,减少首轮工具 schema token。弱模型或不支持 tool_reference 的服务商可以关闭。',
'settings.providers.toolSearchUnsupported': '当前仅 Anthropic Messages 格式支持 Tool Search;OpenAI 代理格式会保留完整工具 schema。',
'settings.providers.availableModels': '可用模型 — 点击选择',
'settings.providers.clickToSelectModel': '点击使用此模型作为主模型',

// Settings > Permissions
'settings.permissions.title': '权限模式',
Expand Down
27 changes: 27 additions & 0 deletions desktop/src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1794,6 +1794,33 @@ function ProviderFormModal({ open, onClose, mode, provider, presets }: ProviderF
)}
</div>

{/* Available models — auto-fill main model when a chip is clicked */}
{testResult?.availableModels && testResult.availableModels.length > 0 && (
<div>
<label className="text-xs font-medium text-[var(--color-text-secondary)] mb-1.5 block">
{t('settings.providers.availableModels') || 'Available models'}
</label>
<div className="flex flex-wrap gap-1.5">
{testResult.availableModels.slice(0, 20).map((model) => (
<button
key={model}
type="button"
onClick={() => handleModelChange('main', model)}
title={t('settings.providers.clickToSelectModel') || 'Click to select'}
className="max-w-[200px] truncate rounded-[var(--radius-sm)] border border-[var(--color-border)] bg-[var(--color-surface-container-low)] px-2 py-1 text-xs text-[var(--color-text-primary)] transition-colors hover:border-[var(--color-border-focus)] hover:bg-[var(--color-surface-hover)] focus:outline-none focus:shadow-[var(--shadow-focus-ring)]"
>
{model}
</button>
))}
{testResult.availableModels.length > 20 && (
<span className="px-2 py-1 text-xs text-[var(--color-text-tertiary)]">
+{testResult.availableModels.length - 20} more
</span>
)}
</div>
</div>
)}

{/* Settings JSON — editable, shown for all presets including official */}
<div>
<label className="text-sm font-medium text-[var(--color-text-primary)] mb-2 block">{t('settings.providers.settingsJson')}</label>
Expand Down
4 changes: 4 additions & 0 deletions desktop/src/stores/settingsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,12 @@ export const useSettingsStore = create<SettingsStore>((set, get) => ({
},

setLocale: (locale) => {
const prev = get().locale
set({ locale })
try { localStorage.setItem(LOCALE_STORAGE_KEY, locale) } catch { /* noop */ }
settingsApi.updateUser({ locale }).catch(() => {
set({ locale: prev })
})
},

setTheme: async (theme) => {
Expand Down
Loading
Loading