mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-24 06:45:22 +00:00
Compare commits
2 Commits
remove-hig
...
update-to-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26ced7b789 | ||
|
|
997b5ea9a5 |
83
.github/workflows/close-stale-prs.yml
vendored
83
.github/workflows/close-stale-prs.yml
vendored
@@ -1,83 +0,0 @@
|
||||
name: Close stale PRs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dryRun:
|
||||
description: "Log actions without closing PRs"
|
||||
type: boolean
|
||||
default: false
|
||||
schedule:
|
||||
- cron: "0 6 * * *"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
close-stale-prs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Close inactive PRs
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const DAYS_INACTIVE = 60
|
||||
const cutoff = new Date(Date.now() - DAYS_INACTIVE * 24 * 60 * 60 * 1000)
|
||||
const { owner, repo } = context.repo
|
||||
const dryRun = context.payload.inputs?.dryRun === "true"
|
||||
const stalePrs = []
|
||||
|
||||
core.info(`Dry run mode: ${dryRun}`)
|
||||
|
||||
const prs = await github.paginate(github.rest.pulls.list, {
|
||||
owner,
|
||||
repo,
|
||||
state: "open",
|
||||
per_page: 100,
|
||||
sort: "updated",
|
||||
direction: "asc",
|
||||
})
|
||||
|
||||
for (const pr of prs) {
|
||||
const lastUpdated = new Date(pr.updated_at)
|
||||
if (lastUpdated > cutoff) {
|
||||
core.info(`PR ${pr.number} is fresh`)
|
||||
continue
|
||||
}
|
||||
|
||||
stalePrs.push(pr)
|
||||
}
|
||||
|
||||
if (!stalePrs.length) {
|
||||
core.info("No stale pull requests found.")
|
||||
return
|
||||
}
|
||||
|
||||
for (const pr of stalePrs) {
|
||||
const issue_number = pr.number
|
||||
const closeComment = `Closing this pull request because it has had no updates for more than ${DAYS_INACTIVE} days. If you plan to continue working on it, feel free to reopen or open a new PR.`
|
||||
|
||||
if (dryRun) {
|
||||
core.info(`[dry-run] Would close PR #${issue_number} from ${pr.user.login}`)
|
||||
continue
|
||||
}
|
||||
|
||||
await github.rest.issues.createComment({
|
||||
owner,
|
||||
repo,
|
||||
issue_number,
|
||||
body: closeComment,
|
||||
})
|
||||
|
||||
await github.rest.pulls.update({
|
||||
owner,
|
||||
repo,
|
||||
pull_number: issue_number,
|
||||
state: "closed",
|
||||
})
|
||||
|
||||
core.info(`Closed PR #${issue_number} from ${pr.user.login}`)
|
||||
}
|
||||
@@ -7,7 +7,7 @@ Please read @package.json and @packages/opencode/package.json.
|
||||
Your job is to look into AI SDK dependencies, figure out if they have versions that can be upgraded (minor or patch versions ONLY no major ignore major changes).
|
||||
|
||||
I want a report of every dependency and the version that can be upgraded to.
|
||||
What would be even better is if you can give me brief summary of the changes for each dep and a link to the changelog for each dependency, or at least some reference info so I can see what bugs were fixed or new features were added.
|
||||
What would be even better is if you can give me links to the changelog for each dependency, or at least some reference info so I can see what bugs were fixed or new features were added.
|
||||
|
||||
Consider using subagents for each dep to save your context window.
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
133
README.it.md
133
README.it.md
@@ -1,133 +0,0 @@
|
||||
<p align="center">
|
||||
<a href="https://opencode.ai">
|
||||
<picture>
|
||||
<source srcset="packages/console/app/src/asset/logo-ornate-dark.svg" media="(prefers-color-scheme: dark)">
|
||||
<source srcset="packages/console/app/src/asset/logo-ornate-light.svg" media="(prefers-color-scheme: light)">
|
||||
<img src="packages/console/app/src/asset/logo-ornate-light.svg" alt="Logo OpenCode">
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
<p align="center">L’agente di coding AI open source.</p>
|
||||
<p align="center">
|
||||
<a href="https://opencode.ai/discord"><img alt="Discord" src="https://img.shields.io/discord/1391832426048651334?style=flat-square&label=discord" /></a>
|
||||
<a href="https://www.npmjs.com/package/opencode-ai"><img alt="npm" src="https://img.shields.io/npm/v/opencode-ai?style=flat-square" /></a>
|
||||
<a href="https://github.com/anomalyco/opencode/actions/workflows/publish.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/anomalyco/opencode/publish.yml?style=flat-square&branch=dev" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="README.md">English</a> |
|
||||
<a href="README.zh.md">简体中文</a> |
|
||||
<a href="README.zht.md">繁體中文</a> |
|
||||
<a href="README.ko.md">한국어</a> |
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
<a href="README.ru.md">Русский</a> |
|
||||
<a href="README.ar.md">العربية</a> |
|
||||
<a href="README.no.md">Norsk</a> |
|
||||
<a href="README.br.md">Português (Brasil)</a>
|
||||
</p>
|
||||
|
||||
[](https://opencode.ai)
|
||||
|
||||
---
|
||||
|
||||
### Installazione
|
||||
|
||||
```bash
|
||||
# YOLO
|
||||
curl -fsSL https://opencode.ai/install | bash
|
||||
|
||||
# Package manager
|
||||
npm i -g opencode-ai@latest # oppure bun/pnpm/yarn
|
||||
scoop install opencode # Windows
|
||||
choco install opencode # Windows
|
||||
brew install anomalyco/tap/opencode # macOS e Linux (consigliato, sempre aggiornato)
|
||||
brew install opencode # macOS e Linux (formula brew ufficiale, aggiornata meno spesso)
|
||||
paru -S opencode-bin # Arch Linux
|
||||
mise use -g opencode # Qualsiasi OS
|
||||
nix run nixpkgs#opencode # oppure github:anomalyco/opencode per l’ultima branch di sviluppo
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> Rimuovi le versioni precedenti alla 0.1.x prima di installare.
|
||||
|
||||
### App Desktop (BETA)
|
||||
|
||||
OpenCode è disponibile anche come applicazione desktop. Puoi scaricarla direttamente dalla [pagina delle release](https://github.com/anomalyco/opencode/releases) oppure da [opencode.ai/download](https://opencode.ai/download).
|
||||
|
||||
| Piattaforma | Download |
|
||||
| --------------------- | ------------------------------------- |
|
||||
| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
|
||||
| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
|
||||
| Windows | `opencode-desktop-windows-x64.exe` |
|
||||
| Linux | `.deb`, `.rpm`, oppure AppImage |
|
||||
|
||||
```bash
|
||||
# macOS (Homebrew)
|
||||
brew install --cask opencode-desktop
|
||||
# Windows (Scoop)
|
||||
scoop bucket add extras; scoop install extras/opencode-desktop
|
||||
```
|
||||
|
||||
#### Directory di installazione
|
||||
|
||||
Lo script di installazione rispetta il seguente ordine di priorità per il percorso di installazione:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` – Directory di installazione personalizzata
|
||||
2. `$XDG_BIN_DIR` – Percorso conforme alla XDG Base Directory Specification
|
||||
3. `$HOME/bin` – Directory binaria standard dell’utente (se esiste o può essere creata)
|
||||
4. `$HOME/.opencode/bin` – Fallback predefinito
|
||||
|
||||
```bash
|
||||
# Esempi
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash
|
||||
```
|
||||
|
||||
### Agenti
|
||||
|
||||
OpenCode include due agenti integrati tra cui puoi passare usando il tasto `Tab`.
|
||||
|
||||
- **build** – Predefinito, agente con accesso completo per il lavoro di sviluppo
|
||||
- **plan** – Agente in sola lettura per analisi ed esplorazione del codice
|
||||
- Nega le modifiche ai file per impostazione predefinita
|
||||
- Chiede il permesso prima di eseguire comandi bash
|
||||
- Ideale per esplorare codebase sconosciute o pianificare modifiche
|
||||
|
||||
È inoltre incluso un sotto-agente **general** per ricerche complesse e attività multi-step.
|
||||
Viene utilizzato internamente e può essere invocato usando `@general` nei messaggi.
|
||||
|
||||
Scopri di più sugli [agenti](https://opencode.ai/docs/agents).
|
||||
|
||||
### Documentazione
|
||||
|
||||
Per maggiori informazioni su come configurare OpenCode, [**consulta la nostra documentazione**](https://opencode.ai/docs).
|
||||
|
||||
### Contribuire
|
||||
|
||||
Se sei interessato a contribuire a OpenCode, leggi la nostra [guida alla contribuzione](./CONTRIBUTING.md) prima di inviare una pull request.
|
||||
|
||||
### Costruire su OpenCode
|
||||
|
||||
Se stai lavorando a un progetto correlato a OpenCode e che utilizza “opencode” come parte del nome (ad esempio “opencode-dashboard” o “opencode-mobile”), aggiungi una nota nel tuo README per chiarire che non è sviluppato dal team OpenCode e che non è affiliato in alcun modo con noi.
|
||||
|
||||
### FAQ
|
||||
|
||||
#### In cosa è diverso da Claude Code?
|
||||
|
||||
È molto simile a Claude Code in termini di funzionalità. Ecco le principali differenze:
|
||||
|
||||
- 100% open source
|
||||
- Non è legato a nessun provider. Anche se consigliamo i modelli forniti tramite [OpenCode Zen](https://opencode.ai/zen), OpenCode può essere utilizzato con Claude, OpenAI, Google o persino modelli locali. Con l’evoluzione dei modelli, le differenze tra di essi si ridurranno e i prezzi scenderanno, quindi essere indipendenti dal provider è importante.
|
||||
- Supporto LSP pronto all’uso
|
||||
- Forte attenzione alla TUI. OpenCode è sviluppato da utenti neovim e dai creatori di [terminal.shop](https://terminal.shop); spingeremo al limite ciò che è possibile fare nel terminale.
|
||||
- Architettura client/server. Questo, ad esempio, permette a OpenCode di girare sul tuo computer mentre lo controlli da remoto tramite un’app mobile. La frontend TUI è quindi solo uno dei possibili client.
|
||||
|
||||
---
|
||||
|
||||
**Unisciti alla nostra community** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode)
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<a href="README.de.md">Deutsch</a> |
|
||||
<a href="README.es.md">Español</a> |
|
||||
<a href="README.fr.md">Français</a> |
|
||||
<a href="README.it.md">Italiano</a> |
|
||||
<a href="README.da.md">Dansk</a> |
|
||||
<a href="README.ja.md">日本語</a> |
|
||||
<a href="README.pl.md">Polski</a> |
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
import { test, expect } from "./fixtures"
|
||||
|
||||
test("file tree can expand folders and open a file", async ({ page, gotoSession }) => {
|
||||
await gotoSession()
|
||||
|
||||
await page.getByRole("button", { name: "Toggle file tree" }).click()
|
||||
|
||||
const treeTabs = page.locator('[data-component="tabs"][data-variant="pill"][data-scope="filetree"]')
|
||||
await expect(treeTabs).toBeVisible()
|
||||
|
||||
await treeTabs.locator('[data-slot="tabs-trigger"]').nth(1).click()
|
||||
|
||||
const node = (name: string) => treeTabs.getByRole("button", { name, exact: true })
|
||||
|
||||
await expect(node("packages")).toBeVisible()
|
||||
await node("packages").click()
|
||||
|
||||
await expect(node("app")).toBeVisible()
|
||||
await node("app").click()
|
||||
|
||||
await expect(node("src")).toBeVisible()
|
||||
await node("src").click()
|
||||
|
||||
await expect(node("components")).toBeVisible()
|
||||
await node("components").click()
|
||||
|
||||
await expect(node("file-tree.tsx")).toBeVisible()
|
||||
await node("file-tree.tsx").click()
|
||||
|
||||
const tab = page.getByRole("tab", { name: "file-tree.tsx" })
|
||||
await expect(tab).toBeVisible()
|
||||
await tab.click()
|
||||
|
||||
const code = page.locator('[data-component="code"]').first()
|
||||
await expect(code.getByText("export default function FileTree")).toBeVisible()
|
||||
})
|
||||
@@ -1,5 +1,5 @@
|
||||
import { test as base, expect } from "@playwright/test"
|
||||
import { createSdk, dirSlug, getWorktree, promptSelector, serverUrl, sessionPath } from "./utils"
|
||||
import { createSdk, dirSlug, getWorktree, promptSelector, sessionPath } from "./utils"
|
||||
|
||||
type TestFixtures = {
|
||||
sdk: ReturnType<typeof createSdk>
|
||||
@@ -29,55 +29,6 @@ export const test = base.extend<TestFixtures, WorkerFixtures>({
|
||||
await use(createSdk(directory))
|
||||
},
|
||||
gotoSession: async ({ page, directory }, use) => {
|
||||
await page.addInitScript(
|
||||
(input: { directory: string; serverUrl: string }) => {
|
||||
const key = "opencode.global.dat:server"
|
||||
const raw = localStorage.getItem(key)
|
||||
const parsed = (() => {
|
||||
if (!raw) return undefined
|
||||
try {
|
||||
return JSON.parse(raw) as unknown
|
||||
} catch {
|
||||
return undefined
|
||||
}
|
||||
})()
|
||||
|
||||
const store = parsed && typeof parsed === "object" ? (parsed as Record<string, unknown>) : {}
|
||||
const list = Array.isArray(store.list) ? store.list : []
|
||||
const lastProject = store.lastProject && typeof store.lastProject === "object" ? store.lastProject : {}
|
||||
const projects = store.projects && typeof store.projects === "object" ? store.projects : {}
|
||||
const nextProjects = { ...(projects as Record<string, unknown>) }
|
||||
|
||||
const add = (origin: string) => {
|
||||
const current = nextProjects[origin]
|
||||
const items = Array.isArray(current) ? current : []
|
||||
const existing = items.filter(
|
||||
(p): p is { worktree: string; expanded?: boolean } =>
|
||||
!!p &&
|
||||
typeof p === "object" &&
|
||||
"worktree" in p &&
|
||||
typeof (p as { worktree?: unknown }).worktree === "string",
|
||||
)
|
||||
|
||||
if (existing.some((p) => p.worktree === input.directory)) return
|
||||
nextProjects[origin] = [{ worktree: input.directory, expanded: true }, ...existing]
|
||||
}
|
||||
|
||||
add("local")
|
||||
add(input.serverUrl)
|
||||
|
||||
localStorage.setItem(
|
||||
key,
|
||||
JSON.stringify({
|
||||
list,
|
||||
projects: nextProjects,
|
||||
lastProject,
|
||||
}),
|
||||
)
|
||||
},
|
||||
{ directory, serverUrl },
|
||||
)
|
||||
|
||||
const gotoSession = async (sessionID?: string) => {
|
||||
await page.goto(sessionPath(directory, sessionID))
|
||||
await expect(page.locator(promptSelector)).toBeVisible()
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
import { test, expect } from "./fixtures"
|
||||
import { modKey, promptSelector } from "./utils"
|
||||
|
||||
type Locator = {
|
||||
first: () => Locator
|
||||
getAttribute: (name: string) => Promise<string | null>
|
||||
scrollIntoViewIfNeeded: () => Promise<void>
|
||||
click: () => Promise<void>
|
||||
}
|
||||
|
||||
type Page = {
|
||||
locator: (selector: string) => Locator
|
||||
keyboard: {
|
||||
press: (key: string) => Promise<void>
|
||||
}
|
||||
}
|
||||
|
||||
type Fixtures = {
|
||||
page: Page
|
||||
slug: string
|
||||
sdk: {
|
||||
session: {
|
||||
create: (input: { title: string }) => Promise<{ data?: { id?: string } }>
|
||||
delete: (input: { sessionID: string }) => Promise<unknown>
|
||||
}
|
||||
}
|
||||
gotoSession: (sessionID?: string) => Promise<void>
|
||||
}
|
||||
|
||||
test("sidebar session links navigate to the selected session", async ({ page, slug, sdk, gotoSession }: Fixtures) => {
|
||||
const stamp = Date.now()
|
||||
|
||||
const one = await sdk.session.create({ title: `e2e sidebar nav 1 ${stamp}` }).then((r) => r.data)
|
||||
const two = await sdk.session.create({ title: `e2e sidebar nav 2 ${stamp}` }).then((r) => r.data)
|
||||
|
||||
if (!one?.id) throw new Error("Session create did not return an id")
|
||||
if (!two?.id) throw new Error("Session create did not return an id")
|
||||
|
||||
try {
|
||||
await gotoSession(one.id)
|
||||
|
||||
const main = page.locator("main")
|
||||
const collapsed = ((await main.getAttribute("class")) ?? "").includes("xl:border-l")
|
||||
if (collapsed) {
|
||||
await page.keyboard.press(`${modKey}+B`)
|
||||
await expect(main).not.toHaveClass(/xl:border-l/)
|
||||
}
|
||||
|
||||
const target = page.locator(`[data-session-id="${two.id}"] a`).first()
|
||||
await expect(target).toBeVisible()
|
||||
await target.scrollIntoViewIfNeeded()
|
||||
await target.click()
|
||||
|
||||
await expect(page).toHaveURL(new RegExp(`/${slug}/session/${two.id}(?:\\?|#|$)`))
|
||||
await expect(page.locator(promptSelector)).toBeVisible()
|
||||
await expect(page.locator(`[data-session-id="${two.id}"] a`).first()).toHaveClass(/\bactive\b/)
|
||||
} finally {
|
||||
await sdk.session.delete({ sessionID: one.id }).catch(() => undefined)
|
||||
await sdk.session.delete({ sessionID: two.id }).catch(() => undefined)
|
||||
}
|
||||
})
|
||||
@@ -26,10 +26,11 @@ import { DialogProvider } from "@opencode-ai/ui/context/dialog"
|
||||
import { CommandProvider } from "@/context/command"
|
||||
import { LanguageProvider, useLanguage } from "@/context/language"
|
||||
import { usePlatform } from "@/context/platform"
|
||||
import { HighlightsProvider } from "@/context/highlights"
|
||||
import { Logo } from "@opencode-ai/ui/logo"
|
||||
import Layout from "@/pages/layout"
|
||||
import DirectoryLayout from "@/pages/directory-layout"
|
||||
import { ErrorPage } from "./pages/error"
|
||||
import { iife } from "@opencode-ai/util/iife"
|
||||
import { Suspense } from "solid-js"
|
||||
|
||||
const Home = lazy(() => import("@/pages/home"))
|
||||
@@ -118,9 +119,7 @@ export function AppInterface(props: { defaultUrl?: string }) {
|
||||
<NotificationProvider>
|
||||
<ModelsProvider>
|
||||
<CommandProvider>
|
||||
<HighlightsProvider>
|
||||
<Layout>{props.children}</Layout>
|
||||
</HighlightsProvider>
|
||||
<Layout>{props.children}</Layout>
|
||||
</CommandProvider>
|
||||
</ModelsProvider>
|
||||
</NotificationProvider>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useDialog } from "@opencode-ai/ui/context/dialog"
|
||||
import { Dialog } from "@opencode-ai/ui/dialog"
|
||||
import { TextField } from "@opencode-ai/ui/text-field"
|
||||
import { Icon } from "@opencode-ai/ui/icon"
|
||||
import { createMemo, For, Show } from "solid-js"
|
||||
import { createMemo, createSignal, For, Show } from "solid-js"
|
||||
import { createStore } from "solid-js/store"
|
||||
import { useGlobalSDK } from "@/context/global-sdk"
|
||||
import { useGlobalSync } from "@/context/global-sync"
|
||||
@@ -29,34 +29,35 @@ export function DialogEditProject(props: { project: LocalProject }) {
|
||||
iconUrl: props.project.icon?.override || "",
|
||||
startup: props.project.commands?.start ?? "",
|
||||
saving: false,
|
||||
dragOver: false,
|
||||
iconHover: false,
|
||||
})
|
||||
|
||||
const [dragOver, setDragOver] = createSignal(false)
|
||||
const [iconHover, setIconHover] = createSignal(false)
|
||||
|
||||
function handleFileSelect(file: File) {
|
||||
if (!file.type.startsWith("image/")) return
|
||||
const reader = new FileReader()
|
||||
reader.onload = (e) => {
|
||||
setStore("iconUrl", e.target?.result as string)
|
||||
setStore("iconHover", false)
|
||||
setIconHover(false)
|
||||
}
|
||||
reader.readAsDataURL(file)
|
||||
}
|
||||
|
||||
function handleDrop(e: DragEvent) {
|
||||
e.preventDefault()
|
||||
setStore("dragOver", false)
|
||||
setDragOver(false)
|
||||
const file = e.dataTransfer?.files[0]
|
||||
if (file) handleFileSelect(file)
|
||||
}
|
||||
|
||||
function handleDragOver(e: DragEvent) {
|
||||
e.preventDefault()
|
||||
setStore("dragOver", true)
|
||||
setDragOver(true)
|
||||
}
|
||||
|
||||
function handleDragLeave() {
|
||||
setStore("dragOver", false)
|
||||
setDragOver(false)
|
||||
}
|
||||
|
||||
function handleInputChange(e: Event) {
|
||||
@@ -115,23 +116,19 @@ export function DialogEditProject(props: { project: LocalProject }) {
|
||||
<div class="flex flex-col gap-2">
|
||||
<label class="text-12-medium text-text-weak">{language.t("dialog.project.edit.icon")}</label>
|
||||
<div class="flex gap-3 items-start">
|
||||
<div
|
||||
class="relative"
|
||||
onMouseEnter={() => setStore("iconHover", true)}
|
||||
onMouseLeave={() => setStore("iconHover", false)}
|
||||
>
|
||||
<div class="relative" onMouseEnter={() => setIconHover(true)} onMouseLeave={() => setIconHover(false)}>
|
||||
<div
|
||||
class="relative size-16 rounded-md transition-colors cursor-pointer"
|
||||
classList={{
|
||||
"border-text-interactive-base bg-surface-info-base/20": store.dragOver,
|
||||
"border-border-base hover:border-border-strong": !store.dragOver,
|
||||
"border-text-interactive-base bg-surface-info-base/20": dragOver(),
|
||||
"border-border-base hover:border-border-strong": !dragOver(),
|
||||
"overflow-hidden": !!store.iconUrl,
|
||||
}}
|
||||
onDrop={handleDrop}
|
||||
onDragOver={handleDragOver}
|
||||
onDragLeave={handleDragLeave}
|
||||
onClick={() => {
|
||||
if (store.iconUrl && store.iconHover) {
|
||||
if (store.iconUrl && iconHover()) {
|
||||
clearIcon()
|
||||
} else {
|
||||
document.getElementById("icon-upload")?.click()
|
||||
@@ -169,7 +166,7 @@ export function DialogEditProject(props: { project: LocalProject }) {
|
||||
"border-radius": "6px",
|
||||
"z-index": 10,
|
||||
"pointer-events": "none",
|
||||
opacity: store.iconHover && !store.iconUrl ? 1 : 0,
|
||||
opacity: iconHover() && !store.iconUrl ? 1 : 0,
|
||||
display: "flex",
|
||||
"align-items": "center",
|
||||
"justify-content": "center",
|
||||
@@ -188,7 +185,7 @@ export function DialogEditProject(props: { project: LocalProject }) {
|
||||
"border-radius": "6px",
|
||||
"z-index": 10,
|
||||
"pointer-events": "none",
|
||||
opacity: store.iconHover && store.iconUrl ? 1 : 0,
|
||||
opacity: iconHover() && store.iconUrl ? 1 : 0,
|
||||
display: "flex",
|
||||
"align-items": "center",
|
||||
"justify-content": "center",
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
import { createSignal, createEffect, onMount, onCleanup } from "solid-js"
|
||||
import { Dialog } from "@opencode-ai/ui/dialog"
|
||||
import { Button } from "@opencode-ai/ui/button"
|
||||
import { useDialog } from "@opencode-ai/ui/context/dialog"
|
||||
import { useSettings } from "@/context/settings"
|
||||
|
||||
export type Highlight = {
|
||||
title: string
|
||||
description: string
|
||||
media?: {
|
||||
type: "image" | "video"
|
||||
src: string
|
||||
alt?: string
|
||||
}
|
||||
}
|
||||
|
||||
export function DialogReleaseNotes(props: { highlights: Highlight[] }) {
|
||||
const dialog = useDialog()
|
||||
const settings = useSettings()
|
||||
const [index, setIndex] = createSignal(0)
|
||||
|
||||
const total = () => props.highlights.length
|
||||
const last = () => Math.max(0, total() - 1)
|
||||
const feature = () => props.highlights[index()] ?? props.highlights[last()]
|
||||
const isFirst = () => index() === 0
|
||||
const isLast = () => index() >= last()
|
||||
const paged = () => total() > 1
|
||||
|
||||
function handleNext() {
|
||||
if (isLast()) return
|
||||
setIndex(index() + 1)
|
||||
}
|
||||
|
||||
function handleClose() {
|
||||
dialog.close()
|
||||
}
|
||||
|
||||
function handleDisable() {
|
||||
settings.general.setReleaseNotes(false)
|
||||
handleClose()
|
||||
}
|
||||
|
||||
let focusTrap: HTMLDivElement | undefined
|
||||
|
||||
function handleKeyDown(e: KeyboardEvent) {
|
||||
if (e.key === "Escape") {
|
||||
e.preventDefault()
|
||||
handleClose()
|
||||
return
|
||||
}
|
||||
|
||||
if (!paged()) return
|
||||
if (e.key === "ArrowLeft" && !isFirst()) {
|
||||
e.preventDefault()
|
||||
setIndex(index() - 1)
|
||||
}
|
||||
if (e.key === "ArrowRight" && !isLast()) {
|
||||
e.preventDefault()
|
||||
setIndex(index() + 1)
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
focusTrap?.focus()
|
||||
document.addEventListener("keydown", handleKeyDown)
|
||||
onCleanup(() => document.removeEventListener("keydown", handleKeyDown))
|
||||
})
|
||||
|
||||
// Refocus the trap when index changes to ensure escape always works
|
||||
createEffect(() => {
|
||||
index() // track index
|
||||
focusTrap?.focus()
|
||||
})
|
||||
|
||||
return (
|
||||
<Dialog class="dialog-release-notes">
|
||||
{/* Hidden element to capture initial focus and handle escape */}
|
||||
<div ref={focusTrap} tabindex="0" class="absolute opacity-0 pointer-events-none" />
|
||||
{/* Left side - Text content */}
|
||||
<div class="flex flex-col flex-1 min-w-0 p-8">
|
||||
{/* Top section - feature content (fixed position from top) */}
|
||||
<div class="flex flex-col gap-2 pt-22">
|
||||
<div class="flex items-center gap-2">
|
||||
<h1 class="text-16-medium text-text-strong">{feature()?.title ?? ""}</h1>
|
||||
</div>
|
||||
<p class="text-14-regular text-text-base">{feature()?.description ?? ""}</p>
|
||||
</div>
|
||||
|
||||
{/* Spacer to push buttons to bottom */}
|
||||
<div class="flex-1" />
|
||||
|
||||
{/* Bottom section - buttons and indicators (fixed position) */}
|
||||
<div class="flex flex-col gap-12">
|
||||
<div class="flex flex-col items-start gap-3">
|
||||
{isLast() ? (
|
||||
<Button variant="primary" size="large" onClick={handleClose}>
|
||||
Get started
|
||||
</Button>
|
||||
) : (
|
||||
<Button variant="secondary" size="large" onClick={handleNext}>
|
||||
Next
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<Button variant="ghost" size="small" onClick={handleDisable}>
|
||||
Don't show these in the future
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{paged() && (
|
||||
<div class="flex items-center gap-1.5 -my-2.5">
|
||||
{props.highlights.map((_, i) => (
|
||||
<button
|
||||
type="button"
|
||||
class="h-6 flex items-center cursor-pointer bg-transparent border-none p-0 transition-all duration-200"
|
||||
classList={{
|
||||
"w-8": i === index(),
|
||||
"w-3": i !== index(),
|
||||
}}
|
||||
onClick={() => setIndex(i)}
|
||||
>
|
||||
<div
|
||||
class="w-full h-0.5 rounded-[1px] transition-colors duration-200"
|
||||
classList={{
|
||||
"bg-icon-strong-base": i === index(),
|
||||
"bg-icon-weak-base": i !== index(),
|
||||
}}
|
||||
/>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Right side - Media content (edge to edge) */}
|
||||
{feature()?.media && (
|
||||
<div class="flex-1 min-w-0 bg-surface-base overflow-hidden rounded-r-xl">
|
||||
{feature()!.media!.type === "image" ? (
|
||||
<img
|
||||
src={feature()!.media!.src}
|
||||
alt={feature()!.media!.alt ?? feature()?.title ?? "Release preview"}
|
||||
class="w-full h-full object-cover"
|
||||
/>
|
||||
) : (
|
||||
<video src={feature()!.media!.src} autoplay loop muted playsinline class="w-full h-full object-cover" />
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
@@ -24,16 +24,13 @@ type Entry = {
|
||||
path?: string
|
||||
}
|
||||
|
||||
type DialogSelectFileMode = "all" | "files"
|
||||
|
||||
export function DialogSelectFile(props: { mode?: DialogSelectFileMode }) {
|
||||
export function DialogSelectFile() {
|
||||
const command = useCommand()
|
||||
const language = useLanguage()
|
||||
const layout = useLayout()
|
||||
const file = useFile()
|
||||
const dialog = useDialog()
|
||||
const params = useParams()
|
||||
const filesOnly = () => props.mode === "files"
|
||||
const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`)
|
||||
const tabs = createMemo(() => layout.tabs(sessionKey))
|
||||
const view = createMemo(() => layout.view(sessionKey))
|
||||
@@ -49,12 +46,11 @@ export function DialogSelectFile(props: { mode?: DialogSelectFileMode }) {
|
||||
]
|
||||
const limit = 5
|
||||
|
||||
const allowed = createMemo(() => {
|
||||
if (filesOnly()) return []
|
||||
return command.options.filter(
|
||||
const allowed = createMemo(() =>
|
||||
command.options.filter(
|
||||
(option) => !option.disabled && !option.id.startsWith("suggested.") && option.id !== "file.open",
|
||||
)
|
||||
})
|
||||
),
|
||||
)
|
||||
|
||||
const commandItem = (option: CommandOption): Entry => ({
|
||||
id: "command:" + option.id,
|
||||
@@ -103,50 +99,10 @@ export function DialogSelectFile(props: { mode?: DialogSelectFileMode }) {
|
||||
return items.slice(0, limit)
|
||||
})
|
||||
|
||||
const root = createMemo(() => {
|
||||
const nodes = file.tree.children("")
|
||||
const paths = nodes
|
||||
.filter((node) => node.type === "file")
|
||||
.map((node) => node.path)
|
||||
.sort((a, b) => a.localeCompare(b))
|
||||
return paths.slice(0, limit).map(fileItem)
|
||||
})
|
||||
|
||||
const unique = (items: Entry[]) => {
|
||||
const seen = new Set<string>()
|
||||
const out: Entry[] = []
|
||||
for (const item of items) {
|
||||
if (seen.has(item.id)) continue
|
||||
seen.add(item.id)
|
||||
out.push(item)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
const items = async (text: string) => {
|
||||
const query = text.trim()
|
||||
const items = async (filter: string) => {
|
||||
const query = filter.trim()
|
||||
setGrouped(query.length > 0)
|
||||
|
||||
if (!query && filesOnly()) {
|
||||
const loaded = file.tree.state("")?.loaded
|
||||
const pending = loaded ? Promise.resolve() : file.tree.list("")
|
||||
const next = unique([...recent(), ...root()])
|
||||
|
||||
if (loaded || next.length > 0) {
|
||||
void pending
|
||||
return next
|
||||
}
|
||||
|
||||
await pending
|
||||
return unique([...recent(), ...root()])
|
||||
}
|
||||
|
||||
if (!query) return [...picks(), ...recent()]
|
||||
|
||||
if (filesOnly()) {
|
||||
const files = await file.searchFiles(query)
|
||||
return files.map(fileItem)
|
||||
}
|
||||
const files = await file.searchFiles(query)
|
||||
const entries = files.map(fileItem)
|
||||
return [...list(), ...entries]
|
||||
@@ -187,12 +143,10 @@ export function DialogSelectFile(props: { mode?: DialogSelectFileMode }) {
|
||||
})
|
||||
|
||||
return (
|
||||
<Dialog class="pt-3 pb-0 !max-h-[480px]" transition>
|
||||
<Dialog class="pt-3 pb-0 !max-h-[480px]">
|
||||
<List
|
||||
search={{
|
||||
placeholder: filesOnly()
|
||||
? language.t("session.header.searchFiles")
|
||||
: language.t("palette.search.placeholder"),
|
||||
placeholder: language.t("palette.search.placeholder"),
|
||||
autofocus: true,
|
||||
hideIcon: true,
|
||||
class: "pl-3 pr-2 !mb-0",
|
||||
|
||||
@@ -110,11 +110,6 @@ export function ModelSelectorPopover<T extends ValidComponent = "div">(props: {
|
||||
setStore("open", false)
|
||||
dialog.show(() => <DialogManageModels />)
|
||||
}
|
||||
|
||||
const handleConnectProvider = () => {
|
||||
setStore("open", false)
|
||||
dialog.show(() => <DialogSelectProvider />)
|
||||
}
|
||||
const language = useLanguage()
|
||||
|
||||
createEffect(() => {
|
||||
@@ -212,26 +207,15 @@ export function ModelSelectorPopover<T extends ValidComponent = "div">(props: {
|
||||
onSelect={() => setStore("open", false)}
|
||||
class="p-1"
|
||||
action={
|
||||
<div class="flex items-center gap-1">
|
||||
<IconButton
|
||||
icon="plus-small"
|
||||
variant="ghost"
|
||||
iconSize="normal"
|
||||
class="size-6"
|
||||
aria-label={language.t("command.provider.connect")}
|
||||
title={language.t("command.provider.connect")}
|
||||
onClick={handleConnectProvider}
|
||||
/>
|
||||
<IconButton
|
||||
icon="sliders"
|
||||
variant="ghost"
|
||||
iconSize="normal"
|
||||
class="size-6"
|
||||
aria-label={language.t("dialog.model.manage")}
|
||||
title={language.t("dialog.model.manage")}
|
||||
onClick={handleManage}
|
||||
/>
|
||||
</div>
|
||||
<IconButton
|
||||
icon="sliders"
|
||||
variant="ghost"
|
||||
iconSize="normal"
|
||||
class="size-6"
|
||||
aria-label={language.t("dialog.model.manage")}
|
||||
title={language.t("dialog.model.manage")}
|
||||
onClick={handleManage}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</Kobalte.Content>
|
||||
|
||||
@@ -18,7 +18,7 @@ export const DialogSelectProvider: Component = () => {
|
||||
const otherGroup = () => language.t("dialog.provider.group.other")
|
||||
|
||||
return (
|
||||
<Dialog title={language.t("command.provider.connect")} transition>
|
||||
<Dialog title={language.t("command.provider.connect")}>
|
||||
<List
|
||||
search={{ placeholder: language.t("dialog.provider.search.placeholder"), autofocus: true }}
|
||||
emptyMessage={language.t("dialog.provider.empty")}
|
||||
|
||||
@@ -14,7 +14,7 @@ export const DialogSettings: Component = () => {
|
||||
const platform = usePlatform()
|
||||
|
||||
return (
|
||||
<Dialog size="x-large" transition>
|
||||
<Dialog size="x-large">
|
||||
<Tabs orientation="vertical" variant="settings" defaultValue="general" class="h-full settings-dialog">
|
||||
<Tabs.List>
|
||||
<div class="flex flex-col justify-between h-full w-full">
|
||||
@@ -38,11 +38,11 @@ export const DialogSettings: Component = () => {
|
||||
<Tabs.SectionTitle>{language.t("settings.section.server")}</Tabs.SectionTitle>
|
||||
<div class="flex flex-col gap-1.5 w-full">
|
||||
<Tabs.Trigger value="providers">
|
||||
<Icon name="providers" />
|
||||
<Icon name="server" />
|
||||
{language.t("settings.providers.title")}
|
||||
</Tabs.Trigger>
|
||||
<Tabs.Trigger value="models">
|
||||
<Icon name="models" />
|
||||
<Icon name="server" />
|
||||
{language.t("settings.models.title")}
|
||||
</Tabs.Trigger>
|
||||
</div>
|
||||
@@ -50,7 +50,7 @@ export const DialogSettings: Component = () => {
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col gap-1 pl-1 py-1 text-12-medium text-text-weak">
|
||||
<span>{language.t("app.name.desktop")}</span>
|
||||
<span>OpenCode Desktop</span>
|
||||
<span class="text-11-regular">v{platform.version}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,261 +1,111 @@
|
||||
import { useFile } from "@/context/file"
|
||||
import { useLocal, type LocalFile } from "@/context/local"
|
||||
import { Collapsible } from "@opencode-ai/ui/collapsible"
|
||||
import { FileIcon } from "@opencode-ai/ui/file-icon"
|
||||
import { Icon } from "@opencode-ai/ui/icon"
|
||||
import { Tooltip } from "@opencode-ai/ui/tooltip"
|
||||
import {
|
||||
createEffect,
|
||||
createMemo,
|
||||
For,
|
||||
Match,
|
||||
splitProps,
|
||||
Switch,
|
||||
untrack,
|
||||
type ComponentProps,
|
||||
type ParentProps,
|
||||
} from "solid-js"
|
||||
import { For, Match, Switch, type ComponentProps, type ParentProps } from "solid-js"
|
||||
import { Dynamic } from "solid-js/web"
|
||||
import type { FileNode } from "@opencode-ai/sdk/v2"
|
||||
|
||||
type Filter = {
|
||||
files: Set<string>
|
||||
dirs: Set<string>
|
||||
}
|
||||
|
||||
export default function FileTree(props: {
|
||||
path: string
|
||||
class?: string
|
||||
nodeClass?: string
|
||||
level?: number
|
||||
allowed?: readonly string[]
|
||||
modified?: readonly string[]
|
||||
draggable?: boolean
|
||||
tooltip?: boolean
|
||||
onFileClick?: (file: FileNode) => void
|
||||
|
||||
_filter?: Filter
|
||||
_marks?: Set<string>
|
||||
_deeps?: Map<string, number>
|
||||
onFileClick?: (file: LocalFile) => void
|
||||
}) {
|
||||
const file = useFile()
|
||||
const local = useLocal()
|
||||
const level = props.level ?? 0
|
||||
const draggable = () => props.draggable ?? true
|
||||
const tooltip = () => props.tooltip ?? true
|
||||
|
||||
const filter = createMemo(() => {
|
||||
if (props._filter) return props._filter
|
||||
const Node = (p: ParentProps & ComponentProps<"div"> & { node: LocalFile; as?: "div" | "button" }) => (
|
||||
<Dynamic
|
||||
component={p.as ?? "div"}
|
||||
classList={{
|
||||
"p-0.5 w-full flex items-center gap-x-2 hover:bg-background-element": true,
|
||||
// "bg-background-element": local.file.active()?.path === p.node.path,
|
||||
[props.nodeClass ?? ""]: !!props.nodeClass,
|
||||
}}
|
||||
style={`padding-left: ${level * 10}px`}
|
||||
draggable={true}
|
||||
onDragStart={(e: any) => {
|
||||
const evt = e as globalThis.DragEvent
|
||||
evt.dataTransfer!.effectAllowed = "copy"
|
||||
evt.dataTransfer!.setData("text/plain", `file:${p.node.path}`)
|
||||
|
||||
const allowed = props.allowed
|
||||
if (!allowed) return
|
||||
// Create custom drag image without margins
|
||||
const dragImage = document.createElement("div")
|
||||
dragImage.className =
|
||||
"flex items-center gap-x-2 px-2 py-1 bg-background-element rounded-md border border-border-1"
|
||||
dragImage.style.position = "absolute"
|
||||
dragImage.style.top = "-1000px"
|
||||
|
||||
const files = new Set(allowed)
|
||||
const dirs = new Set<string>()
|
||||
// Copy only the icon and text content without padding
|
||||
const icon = e.currentTarget.querySelector("svg")
|
||||
const text = e.currentTarget.querySelector("span")
|
||||
if (icon && text) {
|
||||
dragImage.innerHTML = icon.outerHTML + text.outerHTML
|
||||
}
|
||||
|
||||
for (const item of allowed) {
|
||||
const parts = item.split("/")
|
||||
const parents = parts.slice(0, -1)
|
||||
for (const [idx] of parents.entries()) {
|
||||
const dir = parents.slice(0, idx + 1).join("/")
|
||||
if (dir) dirs.add(dir)
|
||||
}
|
||||
}
|
||||
|
||||
return { files, dirs }
|
||||
})
|
||||
|
||||
const marks = createMemo(() => {
|
||||
if (props._marks) return props._marks
|
||||
|
||||
const modified = props.modified
|
||||
if (!modified || modified.length === 0) return
|
||||
return new Set(modified)
|
||||
})
|
||||
|
||||
const deeps = createMemo(() => {
|
||||
if (props._deeps) return props._deeps
|
||||
|
||||
const out = new Map<string, number>()
|
||||
|
||||
const visit = (dir: string, lvl: number): number => {
|
||||
const expanded = file.tree.state(dir)?.expanded ?? false
|
||||
if (!expanded) return -1
|
||||
|
||||
const nodes = file.tree.children(dir)
|
||||
const max = nodes.reduce((max, node) => {
|
||||
if (node.type !== "directory") return max
|
||||
const open = file.tree.state(node.path)?.expanded ?? false
|
||||
if (!open) return max
|
||||
return Math.max(max, visit(node.path, lvl + 1))
|
||||
}, lvl)
|
||||
|
||||
out.set(dir, max)
|
||||
return max
|
||||
}
|
||||
|
||||
visit(props.path, level - 1)
|
||||
return out
|
||||
})
|
||||
|
||||
createEffect(() => {
|
||||
const current = filter()
|
||||
if (!current) return
|
||||
if (level !== 0) return
|
||||
|
||||
for (const dir of current.dirs) {
|
||||
const expanded = untrack(() => file.tree.state(dir)?.expanded) ?? false
|
||||
if (expanded) continue
|
||||
file.tree.expand(dir)
|
||||
}
|
||||
})
|
||||
|
||||
createEffect(() => {
|
||||
const path = props.path
|
||||
untrack(() => void file.tree.list(path))
|
||||
})
|
||||
|
||||
const nodes = createMemo(() => {
|
||||
const nodes = file.tree.children(props.path)
|
||||
const current = filter()
|
||||
if (!current) return nodes
|
||||
return nodes.filter((node) => {
|
||||
if (node.type === "file") return current.files.has(node.path)
|
||||
return current.dirs.has(node.path)
|
||||
})
|
||||
})
|
||||
|
||||
const Node = (
|
||||
p: ParentProps &
|
||||
ComponentProps<"div"> &
|
||||
ComponentProps<"button"> & {
|
||||
node: FileNode
|
||||
as?: "div" | "button"
|
||||
},
|
||||
) => {
|
||||
const [local, rest] = splitProps(p, ["node", "as", "children", "class", "classList"])
|
||||
return (
|
||||
<Dynamic
|
||||
component={local.as ?? "div"}
|
||||
document.body.appendChild(dragImage)
|
||||
evt.dataTransfer!.setDragImage(dragImage, 0, 12)
|
||||
setTimeout(() => document.body.removeChild(dragImage), 0)
|
||||
}}
|
||||
{...p}
|
||||
>
|
||||
{p.children}
|
||||
<span
|
||||
classList={{
|
||||
"w-full min-w-0 h-6 flex items-center justify-start gap-x-1.5 rounded-md px-2 py-0 text-left hover:bg-surface-raised-base-hover active:bg-surface-base-active transition-colors cursor-pointer": true,
|
||||
...(local.classList ?? {}),
|
||||
[local.class ?? ""]: !!local.class,
|
||||
[props.nodeClass ?? ""]: !!props.nodeClass,
|
||||
"text-xs whitespace-nowrap truncate": true,
|
||||
"text-text-muted/40": p.node.ignored,
|
||||
"text-text-muted/80": !p.node.ignored,
|
||||
// "!text-text": local.file.active()?.path === p.node.path,
|
||||
// "!text-primary": local.file.changed(p.node.path),
|
||||
}}
|
||||
style={`padding-left: ${Math.max(0, 8 + level * 12 - (local.node.type === "file" ? 24 : 4))}px`}
|
||||
draggable={draggable()}
|
||||
onDragStart={(e: DragEvent) => {
|
||||
if (!draggable()) return
|
||||
e.dataTransfer?.setData("text/plain", `file:${local.node.path}`)
|
||||
e.dataTransfer?.setData("text/uri-list", `file://${local.node.path}`)
|
||||
if (e.dataTransfer) e.dataTransfer.effectAllowed = "copy"
|
||||
|
||||
const dragImage = document.createElement("div")
|
||||
dragImage.className =
|
||||
"flex items-center gap-x-2 px-2 py-1 bg-surface-raised-base rounded-md border border-border-base text-12-regular text-text-strong"
|
||||
dragImage.style.position = "absolute"
|
||||
dragImage.style.top = "-1000px"
|
||||
|
||||
const icon =
|
||||
(e.currentTarget as HTMLElement).querySelector('[data-component="file-icon"]') ??
|
||||
(e.currentTarget as HTMLElement).querySelector("svg")
|
||||
const text = (e.currentTarget as HTMLElement).querySelector("span")
|
||||
if (icon && text) {
|
||||
dragImage.innerHTML = (icon as SVGElement).outerHTML + (text as HTMLSpanElement).outerHTML
|
||||
}
|
||||
|
||||
document.body.appendChild(dragImage)
|
||||
e.dataTransfer?.setDragImage(dragImage, 0, 12)
|
||||
setTimeout(() => document.body.removeChild(dragImage), 0)
|
||||
}}
|
||||
{...rest}
|
||||
>
|
||||
{local.children}
|
||||
<span
|
||||
classList={{
|
||||
"flex-1 min-w-0 text-12-medium whitespace-nowrap truncate": true,
|
||||
"text-text-weaker": local.node.ignored,
|
||||
"text-text-weak": !local.node.ignored,
|
||||
}}
|
||||
>
|
||||
{local.node.name}
|
||||
</span>
|
||||
{local.node.type === "file" && marks()?.has(local.node.path) ? (
|
||||
<div class="shrink-0 size-1.5 rounded-full bg-surface-warning-strong" />
|
||||
) : null}
|
||||
</Dynamic>
|
||||
)
|
||||
}
|
||||
{p.node.name}
|
||||
</span>
|
||||
{/* <Show when={local.file.changed(p.node.path)}> */}
|
||||
{/* <span class="ml-auto mr-1 w-1.5 h-1.5 rounded-full bg-primary/50 shrink-0" /> */}
|
||||
{/* </Show> */}
|
||||
</Dynamic>
|
||||
)
|
||||
|
||||
return (
|
||||
<div class={`flex flex-col gap-0.5 ${props.class ?? ""}`}>
|
||||
<For each={nodes()}>
|
||||
{(node) => {
|
||||
const expanded = () => file.tree.state(node.path)?.expanded ?? false
|
||||
const deep = () => deeps().get(node.path) ?? -1
|
||||
const Wrapper = (p: ParentProps) => {
|
||||
if (!tooltip()) return p.children
|
||||
return (
|
||||
<Tooltip forceMount={false} openDelay={2000} value={node.path} placement="right" class="w-full">
|
||||
{p.children}
|
||||
</Tooltip>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div class={`flex flex-col ${props.class}`}>
|
||||
<For each={local.file.children(props.path)}>
|
||||
{(node) => (
|
||||
<Tooltip forceMount={false} openDelay={2000} value={node.path} placement="right">
|
||||
<Switch>
|
||||
<Match when={node.type === "directory"}>
|
||||
<Collapsible
|
||||
variant="ghost"
|
||||
class="w-full"
|
||||
data-scope="filetree"
|
||||
forceMount={false}
|
||||
open={expanded()}
|
||||
onOpenChange={(open) => (open ? file.tree.expand(node.path) : file.tree.collapse(node.path))}
|
||||
// open={local.file.node(node.path)?.expanded}
|
||||
onOpenChange={(open) => (open ? local.file.expand(node.path) : local.file.collapse(node.path))}
|
||||
>
|
||||
<Collapsible.Trigger>
|
||||
<Wrapper>
|
||||
<Node node={node}>
|
||||
<div class="size-4 flex items-center justify-center text-icon-weak">
|
||||
<Icon name={expanded() ? "chevron-down" : "chevron-right"} size="small" />
|
||||
</div>
|
||||
</Node>
|
||||
</Wrapper>
|
||||
<Node node={node}>
|
||||
<Collapsible.Arrow class="text-text-muted/60 ml-1" />
|
||||
<FileIcon
|
||||
node={node}
|
||||
// expanded={local.file.node(node.path).expanded}
|
||||
class="text-text-muted/60 -ml-1"
|
||||
/>
|
||||
</Node>
|
||||
</Collapsible.Trigger>
|
||||
<Collapsible.Content class="relative pt-0.5">
|
||||
<div
|
||||
classList={{
|
||||
"absolute top-0 bottom-0 w-px pointer-events-none bg-border-weak-base opacity-0 transition-opacity duration-150 ease-out motion-reduce:transition-none": true,
|
||||
"group-hover/filetree:opacity-100": expanded() && deep() === level,
|
||||
"group-hover/filetree:opacity-50": !(expanded() && deep() === level),
|
||||
}}
|
||||
style={`left: ${Math.max(0, 8 + level * 12 - 4) + 8}px`}
|
||||
/>
|
||||
<FileTree
|
||||
path={node.path}
|
||||
level={level + 1}
|
||||
allowed={props.allowed}
|
||||
modified={props.modified}
|
||||
draggable={props.draggable}
|
||||
tooltip={props.tooltip}
|
||||
onFileClick={props.onFileClick}
|
||||
_filter={filter()}
|
||||
_marks={marks()}
|
||||
_deeps={deeps()}
|
||||
/>
|
||||
<Collapsible.Content>
|
||||
<FileTree path={node.path} level={level + 1} onFileClick={props.onFileClick} />
|
||||
</Collapsible.Content>
|
||||
</Collapsible>
|
||||
</Match>
|
||||
<Match when={node.type === "file"}>
|
||||
<Wrapper>
|
||||
<Node node={node} as="button" type="button" onClick={() => props.onFileClick?.(node)}>
|
||||
<div class="w-4 shrink-0" />
|
||||
<FileIcon node={node} class="text-icon-weak size-4" />
|
||||
</Node>
|
||||
</Wrapper>
|
||||
<Node node={node} as="button" onClick={() => props.onFileClick?.(node)}>
|
||||
<div class="w-4 shrink-0" />
|
||||
<FileIcon node={node} class="text-primary" />
|
||||
</Node>
|
||||
</Match>
|
||||
</Switch>
|
||||
)
|
||||
}}
|
||||
</Tooltip>
|
||||
)}
|
||||
</For>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1565,7 +1565,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
||||
const timeoutMs = 5 * 60 * 1000
|
||||
const timeout = new Promise<Awaited<ReturnType<typeof WorktreeState.wait>>>((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve({ status: "failed", message: language.t("workspace.error.stillPreparing") })
|
||||
resolve({ status: "failed", message: "Workspace is still preparing" })
|
||||
}, timeoutMs)
|
||||
})
|
||||
|
||||
@@ -1863,9 +1863,9 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
||||
store.mode === "shell"
|
||||
? language.t("prompt.placeholder.shell")
|
||||
: commentCount() > 1
|
||||
? language.t("prompt.placeholder.summarizeComments")
|
||||
? "Summarize comments…"
|
||||
: commentCount() === 1
|
||||
? language.t("prompt.placeholder.summarizeComment")
|
||||
? "Summarize comment…"
|
||||
: language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) })
|
||||
}
|
||||
contenteditable="true"
|
||||
@@ -1887,9 +1887,9 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
||||
{store.mode === "shell"
|
||||
? language.t("prompt.placeholder.shell")
|
||||
: commentCount() > 1
|
||||
? language.t("prompt.placeholder.summarizeComments")
|
||||
? "Summarize comments…"
|
||||
: commentCount() === 1
|
||||
? language.t("prompt.placeholder.summarizeComment")
|
||||
? "Summarize comment…"
|
||||
: language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) })}
|
||||
</div>
|
||||
</Show>
|
||||
|
||||
@@ -311,32 +311,6 @@ export function SessionHeader() {
|
||||
</Button>
|
||||
</TooltipKeybind>
|
||||
</div>
|
||||
<div class="hidden md:block shrink-0">
|
||||
<Tooltip value="Toggle file tree" placement="bottom">
|
||||
<Button
|
||||
variant="ghost"
|
||||
class="group/file-tree-toggle size-6 p-0"
|
||||
onClick={() => {
|
||||
const opening = !layout.fileTree.opened()
|
||||
if (opening && !view().reviewPanel.opened()) view().reviewPanel.open()
|
||||
layout.fileTree.toggle()
|
||||
}}
|
||||
aria-label="Toggle file tree"
|
||||
aria-expanded={layout.fileTree.opened()}
|
||||
>
|
||||
<div class="relative flex items-center justify-center size-4">
|
||||
<Icon
|
||||
size="small"
|
||||
name="bullet-list"
|
||||
classList={{
|
||||
"text-icon-strong": layout.fileTree.opened(),
|
||||
"text-icon-weak": !layout.fileTree.opened(),
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</Portal>
|
||||
)}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { JSX } from "solid-js"
|
||||
import { Show } from "solid-js"
|
||||
import { createStore } from "solid-js/store"
|
||||
import { createSignal, Show } from "solid-js"
|
||||
import { createSortable } from "@thisbeyond/solid-dnd"
|
||||
import { IconButton } from "@opencode-ai/ui/icon-button"
|
||||
import { Tabs } from "@opencode-ai/ui/tabs"
|
||||
@@ -13,13 +12,11 @@ export function SortableTerminalTab(props: { terminal: LocalPTY; onClose?: () =>
|
||||
const terminal = useTerminal()
|
||||
const language = useLanguage()
|
||||
const sortable = createSortable(props.terminal.id)
|
||||
const [store, setStore] = createStore({
|
||||
editing: false,
|
||||
title: props.terminal.title,
|
||||
menuOpen: false,
|
||||
menuPosition: { x: 0, y: 0 },
|
||||
blurEnabled: false,
|
||||
})
|
||||
const [editing, setEditing] = createSignal(false)
|
||||
const [title, setTitle] = createSignal(props.terminal.title)
|
||||
const [menuOpen, setMenuOpen] = createSignal(false)
|
||||
const [menuPosition, setMenuPosition] = createSignal({ x: 0, y: 0 })
|
||||
const [blurEnabled, setBlurEnabled] = createSignal(false)
|
||||
|
||||
const isDefaultTitle = () => {
|
||||
const number = props.terminal.titleNumber
|
||||
@@ -50,7 +47,7 @@ export function SortableTerminalTab(props: { terminal: LocalPTY; onClose?: () =>
|
||||
}
|
||||
|
||||
const focus = () => {
|
||||
if (store.editing) return
|
||||
if (editing()) return
|
||||
|
||||
if (document.activeElement instanceof HTMLElement) {
|
||||
document.activeElement.blur()
|
||||
@@ -74,26 +71,26 @@ export function SortableTerminalTab(props: { terminal: LocalPTY; onClose?: () =>
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
setStore("blurEnabled", false)
|
||||
setStore("title", props.terminal.title)
|
||||
setStore("editing", true)
|
||||
setBlurEnabled(false)
|
||||
setTitle(props.terminal.title)
|
||||
setEditing(true)
|
||||
setTimeout(() => {
|
||||
const input = document.getElementById(`terminal-title-input-${props.terminal.id}`) as HTMLInputElement
|
||||
if (!input) return
|
||||
input.focus()
|
||||
input.select()
|
||||
setTimeout(() => setStore("blurEnabled", true), 100)
|
||||
setTimeout(() => setBlurEnabled(true), 100)
|
||||
}, 10)
|
||||
}
|
||||
|
||||
const save = () => {
|
||||
if (!store.blurEnabled) return
|
||||
if (!blurEnabled()) return
|
||||
|
||||
const value = store.title.trim()
|
||||
const value = title().trim()
|
||||
if (value && value !== props.terminal.title) {
|
||||
terminal.update({ id: props.terminal.id, title: value })
|
||||
}
|
||||
setStore("editing", false)
|
||||
setEditing(false)
|
||||
}
|
||||
|
||||
const keydown = (e: KeyboardEvent) => {
|
||||
@@ -104,14 +101,14 @@ export function SortableTerminalTab(props: { terminal: LocalPTY; onClose?: () =>
|
||||
}
|
||||
if (e.key === "Escape") {
|
||||
e.preventDefault()
|
||||
setStore("editing", false)
|
||||
setEditing(false)
|
||||
}
|
||||
}
|
||||
|
||||
const menu = (e: MouseEvent) => {
|
||||
e.preventDefault()
|
||||
setStore("menuPosition", { x: e.clientX, y: e.clientY })
|
||||
setStore("menuOpen", true)
|
||||
setMenuPosition({ x: e.clientX, y: e.clientY })
|
||||
setMenuOpen(true)
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -146,17 +143,17 @@ export function SortableTerminalTab(props: { terminal: LocalPTY; onClose?: () =>
|
||||
/>
|
||||
}
|
||||
>
|
||||
<span onDblClick={edit} style={{ visibility: store.editing ? "hidden" : "visible" }}>
|
||||
<span onDblClick={edit} style={{ visibility: editing() ? "hidden" : "visible" }}>
|
||||
{label()}
|
||||
</span>
|
||||
</Tabs.Trigger>
|
||||
<Show when={store.editing}>
|
||||
<Show when={editing()}>
|
||||
<div class="absolute inset-0 flex items-center px-3 bg-muted z-10 pointer-events-auto">
|
||||
<input
|
||||
id={`terminal-title-input-${props.terminal.id}`}
|
||||
type="text"
|
||||
value={store.title}
|
||||
onInput={(e) => setStore("title", e.currentTarget.value)}
|
||||
value={title()}
|
||||
onInput={(e) => setTitle(e.currentTarget.value)}
|
||||
onBlur={save}
|
||||
onKeyDown={keydown}
|
||||
onMouseDown={(e) => e.stopPropagation()}
|
||||
@@ -164,13 +161,13 @@ export function SortableTerminalTab(props: { terminal: LocalPTY; onClose?: () =>
|
||||
/>
|
||||
</div>
|
||||
</Show>
|
||||
<DropdownMenu open={store.menuOpen} onOpenChange={(open) => setStore("menuOpen", open)}>
|
||||
<DropdownMenu open={menuOpen()} onOpenChange={setMenuOpen}>
|
||||
<DropdownMenu.Portal>
|
||||
<DropdownMenu.Content
|
||||
style={{
|
||||
position: "fixed",
|
||||
left: `${store.menuPosition.x}px`,
|
||||
top: `${store.menuPosition.y}px`,
|
||||
left: `${menuPosition().x}px`,
|
||||
top: `${menuPosition().y}px`,
|
||||
}}
|
||||
>
|
||||
<DropdownMenu.Item onSelect={edit}>
|
||||
|
||||
@@ -214,23 +214,6 @@ export const SettingsGeneral: Component = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Updates Section */}
|
||||
<div class="flex flex-col gap-1">
|
||||
<h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.updates")}</h3>
|
||||
|
||||
<div class="bg-surface-raised-base px-4 rounded-lg">
|
||||
<SettingsRow
|
||||
title={language.t("settings.general.row.releaseNotes.title")}
|
||||
description={language.t("settings.general.row.releaseNotes.description")}
|
||||
>
|
||||
<Switch
|
||||
checked={settings.general.releaseNotes()}
|
||||
onChange={(checked) => settings.general.setReleaseNotes(checked)}
|
||||
/>
|
||||
</SettingsRow>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Sound effects Section */}
|
||||
<div class="flex flex-col gap-1">
|
||||
<h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.sounds")}</h3>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Component, For, Show, createMemo, onCleanup, onMount } from "solid-js"
|
||||
import { createStore } from "solid-js/store"
|
||||
import { Component, For, Show, createMemo, createSignal, onCleanup, onMount } from "solid-js"
|
||||
import { Button } from "@opencode-ai/ui/button"
|
||||
import { Icon } from "@opencode-ai/ui/icon"
|
||||
import { IconButton } from "@opencode-ai/ui/icon-button"
|
||||
@@ -112,26 +111,24 @@ export const SettingsKeybinds: Component = () => {
|
||||
const language = useLanguage()
|
||||
const settings = useSettings()
|
||||
|
||||
const [store, setStore] = createStore({
|
||||
active: null as string | null,
|
||||
filter: "",
|
||||
})
|
||||
const [active, setActive] = createSignal<string | null>(null)
|
||||
const [filter, setFilter] = createSignal("")
|
||||
|
||||
const stop = () => {
|
||||
if (!store.active) return
|
||||
setStore("active", null)
|
||||
if (!active()) return
|
||||
setActive(null)
|
||||
command.keybinds(true)
|
||||
}
|
||||
|
||||
const start = (id: string) => {
|
||||
if (store.active === id) {
|
||||
if (active() === id) {
|
||||
stop()
|
||||
return
|
||||
}
|
||||
|
||||
if (store.active) stop()
|
||||
if (active()) stop()
|
||||
|
||||
setStore("active", id)
|
||||
setActive(id)
|
||||
command.keybinds(false)
|
||||
}
|
||||
|
||||
@@ -206,7 +203,7 @@ export const SettingsKeybinds: Component = () => {
|
||||
})
|
||||
|
||||
const filtered = createMemo(() => {
|
||||
const query = store.filter.toLowerCase().trim()
|
||||
const query = filter().toLowerCase().trim()
|
||||
if (!query) return grouped()
|
||||
|
||||
const map = list()
|
||||
@@ -288,7 +285,7 @@ export const SettingsKeybinds: Component = () => {
|
||||
|
||||
onMount(() => {
|
||||
const handle = (event: KeyboardEvent) => {
|
||||
const id = store.active
|
||||
const id = active()
|
||||
if (!id) return
|
||||
|
||||
event.preventDefault()
|
||||
@@ -348,7 +345,7 @@ export const SettingsKeybinds: Component = () => {
|
||||
})
|
||||
|
||||
onCleanup(() => {
|
||||
if (store.active) command.keybinds(true)
|
||||
if (active()) command.keybinds(true)
|
||||
})
|
||||
|
||||
return (
|
||||
@@ -373,8 +370,8 @@ export const SettingsKeybinds: Component = () => {
|
||||
<TextField
|
||||
variant="ghost"
|
||||
type="text"
|
||||
value={store.filter}
|
||||
onChange={(v) => setStore("filter", v)}
|
||||
value={filter()}
|
||||
onChange={setFilter}
|
||||
placeholder={language.t("settings.shortcuts.search.placeholder")}
|
||||
spellcheck={false}
|
||||
autocorrect="off"
|
||||
@@ -382,8 +379,8 @@ export const SettingsKeybinds: Component = () => {
|
||||
autocapitalize="off"
|
||||
class="flex-1"
|
||||
/>
|
||||
<Show when={store.filter}>
|
||||
<IconButton icon="circle-x" variant="ghost" onClick={() => setStore("filter", "")} />
|
||||
<Show when={filter()}>
|
||||
<IconButton icon="circle-x" variant="ghost" onClick={() => setFilter("")} />
|
||||
</Show>
|
||||
</div>
|
||||
</div>
|
||||
@@ -405,13 +402,13 @@ export const SettingsKeybinds: Component = () => {
|
||||
classList={{
|
||||
"h-8 px-3 rounded-md text-12-regular": true,
|
||||
"bg-surface-base text-text-subtle hover:bg-surface-raised-base-hover active:bg-surface-raised-base-active":
|
||||
store.active !== id,
|
||||
"border border-border-weak-base bg-surface-inset-base text-text-weak": store.active === id,
|
||||
active() !== id,
|
||||
"border border-border-weak-base bg-surface-inset-base text-text-weak": active() === id,
|
||||
}}
|
||||
onClick={() => start(id)}
|
||||
>
|
||||
<Show
|
||||
when={store.active === id}
|
||||
when={active() === id}
|
||||
fallback={command.keybind(id) || language.t("settings.shortcuts.unassigned")}
|
||||
>
|
||||
{language.t("settings.shortcuts.pressKeys")}
|
||||
@@ -426,11 +423,11 @@ export const SettingsKeybinds: Component = () => {
|
||||
)}
|
||||
</For>
|
||||
|
||||
<Show when={store.filter && !hasResults()}>
|
||||
<Show when={filter() && !hasResults()}>
|
||||
<div class="flex flex-col items-center justify-center py-12 text-center">
|
||||
<span class="text-14-regular text-text-weak">{language.t("settings.shortcuts.search.empty")}</span>
|
||||
<Show when={store.filter}>
|
||||
<span class="text-14-regular text-text-strong mt-1">"{store.filter}"</span>
|
||||
<Show when={filter()}>
|
||||
<span class="text-14-regular text-text-strong mt-1">"{filter()}"</span>
|
||||
</Show>
|
||||
</div>
|
||||
</Show>
|
||||
|
||||
@@ -20,12 +20,7 @@ export const SettingsProviders: Component = () => {
|
||||
const globalSDK = useGlobalSDK()
|
||||
const providers = useProviders()
|
||||
|
||||
const connected = createMemo(() => {
|
||||
return providers
|
||||
.connected()
|
||||
.filter((p) => p.id !== "opencode" || Object.values(p.models).find((m) => m.cost?.input))
|
||||
})
|
||||
|
||||
const connected = createMemo(() => providers.connected())
|
||||
const popular = createMemo(() => {
|
||||
const connectedIDs = new Set(connected().map((p) => p.id))
|
||||
const items = providers
|
||||
@@ -89,21 +84,14 @@ export const SettingsProviders: Component = () => {
|
||||
>
|
||||
<For each={connected()}>
|
||||
{(item) => (
|
||||
<div class="group flex items-center justify-between gap-4 h-16 border-b border-border-weak-base last:border-none">
|
||||
<div class="flex items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none">
|
||||
<div class="flex items-center gap-3 min-w-0">
|
||||
<ProviderIcon id={item.id as IconName} class="size-5 shrink-0 icon-strong-base" />
|
||||
<span class="text-14-medium text-text-strong truncate">{item.name}</span>
|
||||
<span class="text-14-regular text-text-strong truncate">{item.name}</span>
|
||||
<Tag>{type(item)}</Tag>
|
||||
</div>
|
||||
<Show
|
||||
when={canDisconnect(item)}
|
||||
fallback={
|
||||
<span class="text-14-regular text-text-base opacity-0 group-hover:opacity-100 transition-opacity duration-200 pr-3 cursor-default">
|
||||
Connected from your environment variables
|
||||
</span>
|
||||
}
|
||||
>
|
||||
<Button size="large" variant="ghost" onClick={() => void disconnect(item.id, item.name)}>
|
||||
<Show when={canDisconnect(item)}>
|
||||
<Button size="small" variant="ghost" onClick={() => void disconnect(item.id, item.name)}>
|
||||
{language.t("common.disconnect")}
|
||||
</Button>
|
||||
</Show>
|
||||
@@ -119,49 +107,21 @@ export const SettingsProviders: Component = () => {
|
||||
<div class="bg-surface-raised-base px-4 rounded-lg">
|
||||
<For each={popular()}>
|
||||
{(item) => (
|
||||
<div class="flex items-center justify-between gap-4 h-16 border-b border-border-weak-base last:border-none">
|
||||
<div class="flex flex-col min-w-0">
|
||||
<div class="flex items-center gap-x-3">
|
||||
<ProviderIcon id={item.id as IconName} class="size-5 shrink-0 icon-strong-base" />
|
||||
<span class="text-14-medium text-text-strong">{item.name}</span>
|
||||
<Show when={item.id === "opencode"}>
|
||||
<Tag>{language.t("dialog.provider.tag.recommended")}</Tag>
|
||||
</Show>
|
||||
</div>
|
||||
<div class="flex items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none">
|
||||
<div class="flex items-center gap-x-3 min-w-0">
|
||||
<ProviderIcon id={item.id as IconName} class="size-5 shrink-0 icon-strong-base" />
|
||||
<span class="text-14-regular text-text-strong">{item.name}</span>
|
||||
<Show when={item.id === "opencode"}>
|
||||
<span class="text-12-regular text-text-weak pl-8">
|
||||
{language.t("dialog.provider.opencode.note")}
|
||||
</span>
|
||||
<Tag>{language.t("dialog.provider.tag.recommended")}</Tag>
|
||||
</Show>
|
||||
<Show when={item.id === "anthropic"}>
|
||||
<span class="text-12-regular text-text-weak pl-8">
|
||||
{language.t("dialog.provider.anthropic.note")}
|
||||
</span>
|
||||
</Show>
|
||||
<Show when={item.id.startsWith("github-copilot")}>
|
||||
<span class="text-12-regular text-text-weak pl-8">
|
||||
{language.t("dialog.provider.copilot.note")}
|
||||
</span>
|
||||
<div class="text-14-regular text-text-weak">{language.t("dialog.provider.anthropic.note")}</div>
|
||||
</Show>
|
||||
<Show when={item.id === "openai"}>
|
||||
<span class="text-12-regular text-text-weak pl-8">
|
||||
{language.t("dialog.provider.openai.note")}
|
||||
</span>
|
||||
<div class="text-14-regular text-text-weak">{language.t("dialog.provider.openai.note")}</div>
|
||||
</Show>
|
||||
<Show when={item.id === "google"}>
|
||||
<span class="text-12-regular text-text-weak pl-8">
|
||||
{language.t("dialog.provider.google.note")}
|
||||
</span>
|
||||
</Show>
|
||||
<Show when={item.id === "openrouter"}>
|
||||
<span class="text-12-regular text-text-weak pl-8">
|
||||
{language.t("dialog.provider.openrouter.note")}
|
||||
</span>
|
||||
</Show>
|
||||
<Show when={item.id === "vercel"}>
|
||||
<span class="text-12-regular text-text-weak pl-8">
|
||||
{language.t("dialog.provider.vercel.note")}
|
||||
</span>
|
||||
<Show when={item.id.startsWith("github-copilot")}>
|
||||
<div class="text-14-regular text-text-weak">{language.t("dialog.provider.copilot.note")}</div>
|
||||
</Show>
|
||||
</div>
|
||||
<Button
|
||||
@@ -181,7 +141,7 @@ export const SettingsProviders: Component = () => {
|
||||
|
||||
<Button
|
||||
variant="ghost"
|
||||
class="px-0 py-0 mt-5 text-14-medium text-text-interactive-base text-left justify-start hover:bg-transparent active:bg-transparent"
|
||||
class="px-0 py-0 text-14-medium text-text-strong text-left justify-start hover:bg-transparent active:bg-transparent"
|
||||
onClick={() => {
|
||||
dialog.show(() => <DialogSelectProvider />)
|
||||
}}
|
||||
|
||||
@@ -39,10 +39,9 @@ export function StatusPopover() {
|
||||
const language = useLanguage()
|
||||
const navigate = useNavigate()
|
||||
|
||||
const [loading, setLoading] = createSignal<string | null>(null)
|
||||
const [store, setStore] = createStore({
|
||||
status: {} as Record<string, ServerStatus | undefined>,
|
||||
loading: null as string | null,
|
||||
defaultServerUrl: undefined as string | undefined,
|
||||
})
|
||||
|
||||
const servers = createMemo(() => {
|
||||
@@ -98,8 +97,8 @@ export function StatusPopover() {
|
||||
const mcpConnected = createMemo(() => mcpItems().filter((i) => i.status === "connected").length)
|
||||
|
||||
const toggleMcp = async (name: string) => {
|
||||
if (store.loading) return
|
||||
setStore("loading", name)
|
||||
if (loading()) return
|
||||
setLoading(name)
|
||||
const status = sync.data.mcp[name]
|
||||
if (status?.status === "connected") {
|
||||
await sdk.client.mcp.disconnect({ name })
|
||||
@@ -108,7 +107,7 @@ export function StatusPopover() {
|
||||
}
|
||||
const result = await sdk.client.mcp.status()
|
||||
if (result.data) sync.set("mcp", result.data)
|
||||
setStore("loading", null)
|
||||
setLoading(null)
|
||||
}
|
||||
|
||||
const lspItems = createMemo(() => sync.data.lsp ?? [])
|
||||
@@ -124,17 +123,19 @@ export function StatusPopover() {
|
||||
|
||||
const serverCount = createMemo(() => sortedServers().length)
|
||||
|
||||
const [defaultServerUrl, setDefaultServerUrl] = createSignal<string | undefined>()
|
||||
|
||||
const refreshDefaultServerUrl = () => {
|
||||
const result = platform.getDefaultServerUrl?.()
|
||||
if (!result) {
|
||||
setStore("defaultServerUrl", undefined)
|
||||
setDefaultServerUrl(undefined)
|
||||
return
|
||||
}
|
||||
if (result instanceof Promise) {
|
||||
result.then((url) => setStore("defaultServerUrl", url ? normalizeServerUrl(url) : undefined))
|
||||
result.then((url) => setDefaultServerUrl(url ? normalizeServerUrl(url) : undefined))
|
||||
return
|
||||
}
|
||||
setStore("defaultServerUrl", normalizeServerUrl(result))
|
||||
setDefaultServerUrl(normalizeServerUrl(result))
|
||||
}
|
||||
|
||||
createEffect(() => {
|
||||
@@ -219,7 +220,7 @@ export function StatusPopover() {
|
||||
<For each={sortedServers()}>
|
||||
{(url) => {
|
||||
const isActive = () => url === server.url
|
||||
const isDefault = () => url === store.defaultServerUrl
|
||||
const isDefault = () => url === defaultServerUrl()
|
||||
const status = () => store.status[url]
|
||||
const isBlocked = () => status()?.healthy === false
|
||||
const [truncated, setTruncated] = createSignal(false)
|
||||
@@ -328,7 +329,7 @@ export function StatusPopover() {
|
||||
type="button"
|
||||
class="flex items-center gap-2 w-full h-8 pl-3 pr-2 py-1 rounded-md hover:bg-surface-raised-base-hover transition-colors text-left"
|
||||
onClick={() => toggleMcp(item.name)}
|
||||
disabled={store.loading === item.name}
|
||||
disabled={loading() === item.name}
|
||||
>
|
||||
<div
|
||||
classList={{
|
||||
@@ -344,7 +345,7 @@ export function StatusPopover() {
|
||||
<div onClick={(event) => event.stopPropagation()}>
|
||||
<Switch
|
||||
checked={enabled()}
|
||||
disabled={store.loading === item.name}
|
||||
disabled={loading() === item.name}
|
||||
onChange={() => toggleMcp(item.name)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createEffect, createMemo, onCleanup, onMount, type Accessor } from "solid-js"
|
||||
import { createEffect, createMemo, createSignal, onCleanup, onMount, type Accessor } from "solid-js"
|
||||
import { createStore } from "solid-js/store"
|
||||
import { createSimpleContext } from "@opencode-ai/ui/context"
|
||||
import { useDialog } from "@opencode-ai/ui/context/dialog"
|
||||
@@ -165,10 +165,8 @@ export const { use: useCommand, provider: CommandProvider } = createSimpleContex
|
||||
const dialog = useDialog()
|
||||
const settings = useSettings()
|
||||
const language = useLanguage()
|
||||
const [store, setStore] = createStore({
|
||||
registrations: [] as Accessor<CommandOption[]>[],
|
||||
suspendCount: 0,
|
||||
})
|
||||
const [registrations, setRegistrations] = createSignal<Accessor<CommandOption[]>[]>([])
|
||||
const [suspendCount, setSuspendCount] = createSignal(0)
|
||||
|
||||
const [catalog, setCatalog, _, catalogReady] = persisted(
|
||||
Persist.global("command.catalog.v1"),
|
||||
@@ -186,7 +184,7 @@ export const { use: useCommand, provider: CommandProvider } = createSimpleContex
|
||||
const seen = new Set<string>()
|
||||
const all: CommandOption[] = []
|
||||
|
||||
for (const reg of store.registrations) {
|
||||
for (const reg of registrations()) {
|
||||
for (const opt of reg()) {
|
||||
if (seen.has(opt.id)) continue
|
||||
seen.add(opt.id)
|
||||
@@ -232,7 +230,7 @@ export const { use: useCommand, provider: CommandProvider } = createSimpleContex
|
||||
]
|
||||
})
|
||||
|
||||
const suspended = () => store.suspendCount > 0
|
||||
const suspended = () => suspendCount() > 0
|
||||
|
||||
const palette = createMemo(() => {
|
||||
const config = settings.keybinds.get(PALETTE_ID) ?? DEFAULT_PALETTE_KEYBIND
|
||||
@@ -299,9 +297,9 @@ export const { use: useCommand, provider: CommandProvider } = createSimpleContex
|
||||
return {
|
||||
register(cb: () => CommandOption[]) {
|
||||
const results = createMemo(cb)
|
||||
setStore("registrations", (arr) => [results, ...arr])
|
||||
setRegistrations((arr) => [results, ...arr])
|
||||
onCleanup(() => {
|
||||
setStore("registrations", (arr) => arr.filter((x) => x !== results))
|
||||
setRegistrations((arr) => arr.filter((x) => x !== results))
|
||||
})
|
||||
},
|
||||
trigger(id: string, source?: "palette" | "keybind" | "slash") {
|
||||
@@ -323,7 +321,7 @@ export const { use: useCommand, provider: CommandProvider } = createSimpleContex
|
||||
},
|
||||
show: showPalette,
|
||||
keybinds(enabled: boolean) {
|
||||
setStore("suspendCount", (count) => count + (enabled ? -1 : 1))
|
||||
setSuspendCount((count) => count + (enabled ? -1 : 1))
|
||||
},
|
||||
suspended,
|
||||
get catalog() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { batch, createMemo, createRoot, onCleanup } from "solid-js"
|
||||
import { batch, createMemo, createRoot, createSignal, onCleanup } from "solid-js"
|
||||
import { createStore } from "solid-js/store"
|
||||
import { createSimpleContext } from "@opencode-ai/ui/context"
|
||||
import { useParams } from "@solidjs/router"
|
||||
@@ -37,16 +37,8 @@ function createCommentSession(dir: string, id: string | undefined) {
|
||||
}),
|
||||
)
|
||||
|
||||
const [state, setState] = createStore({
|
||||
focus: null as CommentFocus | null,
|
||||
active: null as CommentFocus | null,
|
||||
})
|
||||
|
||||
const setFocus = (value: CommentFocus | null | ((value: CommentFocus | null) => CommentFocus | null)) =>
|
||||
setState("focus", value)
|
||||
|
||||
const setActive = (value: CommentFocus | null | ((value: CommentFocus | null) => CommentFocus | null)) =>
|
||||
setState("active", value)
|
||||
const [focus, setFocus] = createSignal<CommentFocus | null>(null)
|
||||
const [active, setActive] = createSignal<CommentFocus | null>(null)
|
||||
|
||||
const list = (file: string) => store.comments[file] ?? []
|
||||
|
||||
@@ -82,10 +74,10 @@ function createCommentSession(dir: string, id: string | undefined) {
|
||||
all,
|
||||
add,
|
||||
remove,
|
||||
focus: createMemo(() => state.focus),
|
||||
focus: createMemo(() => focus()),
|
||||
setFocus,
|
||||
clearFocus: () => setFocus(null),
|
||||
active: createMemo(() => state.active),
|
||||
active: createMemo(() => active()),
|
||||
setActive,
|
||||
clearActive: () => setActive(null),
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createEffect, createMemo, createRoot, onCleanup } from "solid-js"
|
||||
import { createStore, produce } from "solid-js/store"
|
||||
import { createSimpleContext } from "@opencode-ai/ui/context"
|
||||
import type { FileContent, FileNode } from "@opencode-ai/sdk/v2"
|
||||
import type { FileContent } from "@opencode-ai/sdk/v2"
|
||||
import { showToast } from "@opencode-ai/ui/toast"
|
||||
import { useParams } from "@solidjs/router"
|
||||
import { getFilename } from "@opencode-ai/util/path"
|
||||
@@ -39,14 +39,6 @@ export type FileState = {
|
||||
content?: FileContent
|
||||
}
|
||||
|
||||
type DirectoryState = {
|
||||
expanded: boolean
|
||||
loaded?: boolean
|
||||
loading?: boolean
|
||||
error?: string
|
||||
children?: string[]
|
||||
}
|
||||
|
||||
function stripFileProtocol(input: string) {
|
||||
if (!input.startsWith("file://")) return input
|
||||
return input.slice("file://".length)
|
||||
@@ -293,7 +285,6 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
|
||||
}
|
||||
|
||||
const inflight = new Map<string, Promise<void>>()
|
||||
const treeInflight = new Map<string, Promise<void>>()
|
||||
|
||||
const [store, setStore] = createStore<{
|
||||
file: Record<string, FileState>
|
||||
@@ -301,21 +292,10 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
|
||||
file: {},
|
||||
})
|
||||
|
||||
const [tree, setTree] = createStore<{
|
||||
node: Record<string, FileNode>
|
||||
dir: Record<string, DirectoryState>
|
||||
}>({
|
||||
node: {},
|
||||
dir: { "": { expanded: true } },
|
||||
})
|
||||
|
||||
createEffect(() => {
|
||||
scope()
|
||||
inflight.clear()
|
||||
treeInflight.clear()
|
||||
setStore("file", {})
|
||||
setTree("node", {})
|
||||
setTree("dir", { "": { expanded: true } })
|
||||
})
|
||||
|
||||
const viewCache = new Map<string, ViewCacheEntry>()
|
||||
@@ -427,168 +407,14 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
|
||||
return promise
|
||||
}
|
||||
|
||||
function normalizeDir(input: string) {
|
||||
return normalize(input).replace(/\/+$/, "")
|
||||
}
|
||||
|
||||
function ensureDir(path: string) {
|
||||
if (tree.dir[path]) return
|
||||
setTree("dir", path, { expanded: false })
|
||||
}
|
||||
|
||||
function listDir(input: string, options?: { force?: boolean }) {
|
||||
const dir = normalizeDir(input)
|
||||
ensureDir(dir)
|
||||
|
||||
const current = tree.dir[dir]
|
||||
if (!options?.force && current?.loaded) return Promise.resolve()
|
||||
|
||||
const pending = treeInflight.get(dir)
|
||||
if (pending) return pending
|
||||
|
||||
setTree(
|
||||
"dir",
|
||||
dir,
|
||||
produce((draft) => {
|
||||
draft.loading = true
|
||||
draft.error = undefined
|
||||
}),
|
||||
)
|
||||
|
||||
const directory = scope()
|
||||
|
||||
const promise = sdk.client.file
|
||||
.list({ path: dir })
|
||||
.then((x) => {
|
||||
if (scope() !== directory) return
|
||||
const nodes = x.data ?? []
|
||||
const prevChildren = tree.dir[dir]?.children ?? []
|
||||
const nextChildren = nodes.map((node) => node.path)
|
||||
const nextSet = new Set(nextChildren)
|
||||
|
||||
setTree(
|
||||
"node",
|
||||
produce((draft) => {
|
||||
const removedDirs: string[] = []
|
||||
|
||||
for (const child of prevChildren) {
|
||||
if (nextSet.has(child)) continue
|
||||
const existing = draft[child]
|
||||
if (existing?.type === "directory") removedDirs.push(child)
|
||||
delete draft[child]
|
||||
}
|
||||
|
||||
if (removedDirs.length > 0) {
|
||||
const keys = Object.keys(draft)
|
||||
for (const key of keys) {
|
||||
for (const removed of removedDirs) {
|
||||
if (!key.startsWith(removed + "/")) continue
|
||||
delete draft[key]
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const node of nodes) {
|
||||
draft[node.path] = node
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
||||
setTree(
|
||||
"dir",
|
||||
dir,
|
||||
produce((draft) => {
|
||||
draft.loaded = true
|
||||
draft.loading = false
|
||||
draft.children = nextChildren
|
||||
}),
|
||||
)
|
||||
})
|
||||
.catch((e) => {
|
||||
if (scope() !== directory) return
|
||||
setTree(
|
||||
"dir",
|
||||
dir,
|
||||
produce((draft) => {
|
||||
draft.loading = false
|
||||
draft.error = e.message
|
||||
}),
|
||||
)
|
||||
showToast({
|
||||
variant: "error",
|
||||
title: language.t("toast.file.listFailed.title"),
|
||||
description: e.message,
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
treeInflight.delete(dir)
|
||||
})
|
||||
|
||||
treeInflight.set(dir, promise)
|
||||
return promise
|
||||
}
|
||||
|
||||
function expandDir(input: string) {
|
||||
const dir = normalizeDir(input)
|
||||
ensureDir(dir)
|
||||
setTree("dir", dir, "expanded", true)
|
||||
void listDir(dir)
|
||||
}
|
||||
|
||||
function collapseDir(input: string) {
|
||||
const dir = normalizeDir(input)
|
||||
ensureDir(dir)
|
||||
setTree("dir", dir, "expanded", false)
|
||||
}
|
||||
|
||||
function dirState(input: string) {
|
||||
const dir = normalizeDir(input)
|
||||
return tree.dir[dir]
|
||||
}
|
||||
|
||||
function children(input: string) {
|
||||
const dir = normalizeDir(input)
|
||||
const ids = tree.dir[dir]?.children
|
||||
if (!ids) return []
|
||||
const out: FileNode[] = []
|
||||
for (const id of ids) {
|
||||
const node = tree.node[id]
|
||||
if (node) out.push(node)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
const stop = sdk.event.listen((e) => {
|
||||
const event = e.details
|
||||
if (event.type !== "file.watcher.updated") return
|
||||
const path = normalize(event.properties.file)
|
||||
if (!path) return
|
||||
if (path.startsWith(".git/")) return
|
||||
|
||||
if (store.file[path]) {
|
||||
load(path, { force: true })
|
||||
}
|
||||
|
||||
const kind = event.properties.event
|
||||
if (kind === "change") {
|
||||
const dir = (() => {
|
||||
if (path === "") return ""
|
||||
const node = tree.node[path]
|
||||
if (node?.type !== "directory") return
|
||||
return path
|
||||
})()
|
||||
if (dir === undefined) return
|
||||
if (!tree.dir[dir]?.loaded) return
|
||||
listDir(dir, { force: true })
|
||||
return
|
||||
}
|
||||
if (kind !== "add" && kind !== "unlink") return
|
||||
|
||||
const parent = path.split("/").slice(0, -1).join("/")
|
||||
if (!tree.dir[parent]?.loaded) return
|
||||
|
||||
listDir(parent, { force: true })
|
||||
if (!store.file[path]) return
|
||||
load(path, { force: true })
|
||||
})
|
||||
|
||||
const get = (input: string) => store.file[normalize(input)]
|
||||
@@ -622,21 +448,6 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
|
||||
normalize,
|
||||
tab,
|
||||
pathFromTab,
|
||||
tree: {
|
||||
list: listDir,
|
||||
refresh: (input: string) => listDir(input, { force: true }),
|
||||
state: dirState,
|
||||
children,
|
||||
expand: expandDir,
|
||||
collapse: collapseDir,
|
||||
toggle(input: string) {
|
||||
if (dirState(input)?.expanded) {
|
||||
collapseDir(input)
|
||||
return
|
||||
}
|
||||
expandDir(input)
|
||||
},
|
||||
},
|
||||
get,
|
||||
load,
|
||||
scrollTop,
|
||||
|
||||
@@ -225,65 +225,6 @@ function createGlobalSync() {
|
||||
const sessionLoads = new Map<string, Promise<void>>()
|
||||
const sessionMeta = new Map<string, { limit: number }>()
|
||||
|
||||
const sessionRecentWindow = 4 * 60 * 60 * 1000
|
||||
const sessionRecentLimit = 50
|
||||
|
||||
function sessionUpdatedAt(session: Session) {
|
||||
return session.time.updated ?? session.time.created
|
||||
}
|
||||
|
||||
function compareSessionRecent(a: Session, b: Session) {
|
||||
const aUpdated = sessionUpdatedAt(a)
|
||||
const bUpdated = sessionUpdatedAt(b)
|
||||
if (aUpdated !== bUpdated) return bUpdated - aUpdated
|
||||
return a.id.localeCompare(b.id)
|
||||
}
|
||||
|
||||
function takeRecentSessions(sessions: Session[], limit: number, cutoff: number) {
|
||||
if (limit <= 0) return [] as Session[]
|
||||
const selected: Session[] = []
|
||||
const seen = new Set<string>()
|
||||
for (const session of sessions) {
|
||||
if (!session?.id) continue
|
||||
if (seen.has(session.id)) continue
|
||||
seen.add(session.id)
|
||||
|
||||
if (sessionUpdatedAt(session) <= cutoff) continue
|
||||
|
||||
const index = selected.findIndex((x) => compareSessionRecent(session, x) < 0)
|
||||
if (index === -1) selected.push(session)
|
||||
if (index !== -1) selected.splice(index, 0, session)
|
||||
if (selected.length > limit) selected.pop()
|
||||
}
|
||||
return selected
|
||||
}
|
||||
|
||||
function trimSessions(input: Session[], options: { limit: number; permission: Record<string, PermissionRequest[]> }) {
|
||||
const limit = Math.max(0, options.limit)
|
||||
const cutoff = Date.now() - sessionRecentWindow
|
||||
const all = input
|
||||
.filter((s) => !!s?.id)
|
||||
.filter((s) => !s.time?.archived)
|
||||
.sort((a, b) => a.id.localeCompare(b.id))
|
||||
|
||||
const roots = all.filter((s) => !s.parentID)
|
||||
const children = all.filter((s) => !!s.parentID)
|
||||
|
||||
const base = roots.slice(0, limit)
|
||||
const recent = takeRecentSessions(roots.slice(limit), sessionRecentLimit, cutoff)
|
||||
const keepRoots = [...base, ...recent]
|
||||
|
||||
const keepRootIds = new Set(keepRoots.map((s) => s.id))
|
||||
const keepChildren = children.filter((s) => {
|
||||
if (s.parentID && keepRootIds.has(s.parentID)) return true
|
||||
const perms = options.permission[s.id] ?? []
|
||||
if (perms.length > 0) return true
|
||||
return sessionUpdatedAt(s) > cutoff
|
||||
})
|
||||
|
||||
return [...keepRoots, ...keepChildren].sort((a, b) => a.id.localeCompare(b.id))
|
||||
}
|
||||
|
||||
function ensureChild(directory: string) {
|
||||
if (!directory) console.error("No directory provided")
|
||||
if (!children[directory]) {
|
||||
@@ -382,13 +323,7 @@ function createGlobalSync() {
|
||||
|
||||
const [store, setStore] = child(directory, { bootstrap: false })
|
||||
const meta = sessionMeta.get(directory)
|
||||
if (meta && meta.limit >= store.limit) {
|
||||
const next = trimSessions(store.session, { limit: store.limit, permission: store.permission })
|
||||
if (next.length !== store.session.length) {
|
||||
setStore("session", reconcile(next, { key: "id" }))
|
||||
}
|
||||
return
|
||||
}
|
||||
if (meta && meta.limit >= store.limit) return
|
||||
|
||||
const promise = globalSDK.client.session
|
||||
.list({ directory, roots: true })
|
||||
@@ -402,9 +337,21 @@ function createGlobalSync() {
|
||||
// a request is in-flight still get the expanded result.
|
||||
const limit = store.limit
|
||||
|
||||
const children = store.session.filter((s) => !!s.parentID)
|
||||
const sessions = trimSessions([...nonArchived, ...children], { limit, permission: store.permission })
|
||||
const sandboxWorkspace = globalStore.project.some((p) => (p.sandboxes ?? []).includes(directory))
|
||||
if (sandboxWorkspace) {
|
||||
setStore("sessionTotal", nonArchived.length)
|
||||
setStore("session", reconcile(nonArchived, { key: "id" }))
|
||||
sessionMeta.set(directory, { limit })
|
||||
return
|
||||
}
|
||||
|
||||
const fourHoursAgo = Date.now() - 4 * 60 * 60 * 1000
|
||||
// Include up to the limit, plus any updated in the last 4 hours
|
||||
const sessions = nonArchived.filter((s, i) => {
|
||||
if (i < limit) return true
|
||||
const updated = new Date(s.time?.updated ?? s.time?.created).getTime()
|
||||
return updated > fourHoursAgo
|
||||
})
|
||||
// Store total session count (used for "load more" pagination)
|
||||
setStore("sessionTotal", nonArchived.length)
|
||||
setStore("session", reconcile(sessions, { key: "id" }))
|
||||
@@ -589,25 +536,25 @@ function createGlobalSync() {
|
||||
break
|
||||
}
|
||||
case "session.created": {
|
||||
const info = event.properties.info
|
||||
const result = Binary.search(store.session, info.id, (s) => s.id)
|
||||
const result = Binary.search(store.session, event.properties.info.id, (s) => s.id)
|
||||
if (result.found) {
|
||||
setStore("session", result.index, reconcile(info))
|
||||
setStore("session", result.index, reconcile(event.properties.info))
|
||||
break
|
||||
}
|
||||
const next = store.session.slice()
|
||||
next.splice(result.index, 0, info)
|
||||
const trimmed = trimSessions(next, { limit: store.limit, permission: store.permission })
|
||||
setStore("session", reconcile(trimmed, { key: "id" }))
|
||||
if (!info.parentID) {
|
||||
setStore("sessionTotal", (value) => value + 1)
|
||||
setStore(
|
||||
"session",
|
||||
produce((draft) => {
|
||||
draft.splice(result.index, 0, event.properties.info)
|
||||
}),
|
||||
)
|
||||
if (!event.properties.info.parentID) {
|
||||
setStore("sessionTotal", store.sessionTotal + 1)
|
||||
}
|
||||
break
|
||||
}
|
||||
case "session.updated": {
|
||||
const info = event.properties.info
|
||||
const result = Binary.search(store.session, info.id, (s) => s.id)
|
||||
if (info.time.archived) {
|
||||
const result = Binary.search(store.session, event.properties.info.id, (s) => s.id)
|
||||
if (event.properties.info.time.archived) {
|
||||
if (result.found) {
|
||||
setStore(
|
||||
"session",
|
||||
@@ -616,18 +563,20 @@ function createGlobalSync() {
|
||||
}),
|
||||
)
|
||||
}
|
||||
if (info.parentID) break
|
||||
if (event.properties.info.parentID) break
|
||||
setStore("sessionTotal", (value) => Math.max(0, value - 1))
|
||||
break
|
||||
}
|
||||
if (result.found) {
|
||||
setStore("session", result.index, reconcile(info))
|
||||
setStore("session", result.index, reconcile(event.properties.info))
|
||||
break
|
||||
}
|
||||
const next = store.session.slice()
|
||||
next.splice(result.index, 0, info)
|
||||
const trimmed = trimSessions(next, { limit: store.limit, permission: store.permission })
|
||||
setStore("session", reconcile(trimmed, { key: "id" }))
|
||||
setStore(
|
||||
"session",
|
||||
produce((draft) => {
|
||||
draft.splice(result.index, 0, event.properties.info)
|
||||
}),
|
||||
)
|
||||
break
|
||||
}
|
||||
case "session.deleted": {
|
||||
|
||||
@@ -1,225 +0,0 @@
|
||||
import { createEffect, createSignal, onCleanup } from "solid-js"
|
||||
import { createStore } from "solid-js/store"
|
||||
import { createSimpleContext } from "@opencode-ai/ui/context"
|
||||
import { useDialog } from "@opencode-ai/ui/context/dialog"
|
||||
import { usePlatform } from "@/context/platform"
|
||||
import { useSettings } from "@/context/settings"
|
||||
import { persisted } from "@/utils/persist"
|
||||
import { DialogReleaseNotes, type Highlight } from "@/components/dialog-release-notes"
|
||||
|
||||
const CHANGELOG_URL = "https://opencode.ai/changelog.json"
|
||||
|
||||
type Store = {
|
||||
version?: string
|
||||
}
|
||||
|
||||
type ParsedRelease = {
|
||||
tag?: string
|
||||
highlights: Highlight[]
|
||||
}
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return typeof value === "object" && value !== null && !Array.isArray(value)
|
||||
}
|
||||
|
||||
function getText(value: unknown): string | undefined {
|
||||
if (typeof value === "string") {
|
||||
const text = value.trim()
|
||||
return text.length > 0 ? text : undefined
|
||||
}
|
||||
|
||||
if (typeof value === "number") return String(value)
|
||||
return
|
||||
}
|
||||
|
||||
function normalizeVersion(value: string | undefined) {
|
||||
const text = value?.trim()
|
||||
if (!text) return
|
||||
return text.startsWith("v") || text.startsWith("V") ? text.slice(1) : text
|
||||
}
|
||||
|
||||
function parseMedia(value: unknown, alt: string): Highlight["media"] | undefined {
|
||||
if (!isRecord(value)) return
|
||||
const type = getText(value.type)?.toLowerCase()
|
||||
const src = getText(value.src) ?? getText(value.url)
|
||||
if (!src) return
|
||||
if (type !== "image" && type !== "video") return
|
||||
|
||||
return { type, src, alt }
|
||||
}
|
||||
|
||||
function parseHighlight(value: unknown): Highlight | undefined {
|
||||
if (!isRecord(value)) return
|
||||
|
||||
const title = getText(value.title)
|
||||
if (!title) return
|
||||
|
||||
const description = getText(value.description) ?? getText(value.shortDescription)
|
||||
if (!description) return
|
||||
|
||||
const media = parseMedia(value.media, title)
|
||||
return { title, description, media }
|
||||
}
|
||||
|
||||
function parseRelease(value: unknown): ParsedRelease | undefined {
|
||||
if (!isRecord(value)) return
|
||||
const tag = getText(value.tag) ?? getText(value.tag_name) ?? getText(value.name)
|
||||
|
||||
if (!Array.isArray(value.highlights)) {
|
||||
return { tag, highlights: [] }
|
||||
}
|
||||
|
||||
const highlights = value.highlights.flatMap((group) => {
|
||||
if (!isRecord(group)) return []
|
||||
|
||||
const source = getText(group.source)
|
||||
if (!source) return []
|
||||
if (!source.toLowerCase().includes("desktop")) return []
|
||||
|
||||
if (Array.isArray(group.items)) {
|
||||
return group.items.map((item) => parseHighlight(item)).filter((item): item is Highlight => item !== undefined)
|
||||
}
|
||||
|
||||
const item = parseHighlight(group)
|
||||
if (!item) return []
|
||||
return [item]
|
||||
})
|
||||
|
||||
return { tag, highlights }
|
||||
}
|
||||
|
||||
function parseChangelog(value: unknown): ParsedRelease[] | undefined {
|
||||
if (Array.isArray(value)) {
|
||||
return value.map(parseRelease).filter((release): release is ParsedRelease => release !== undefined)
|
||||
}
|
||||
|
||||
if (!isRecord(value)) return
|
||||
if (!Array.isArray(value.releases)) return
|
||||
|
||||
return value.releases.map(parseRelease).filter((release): release is ParsedRelease => release !== undefined)
|
||||
}
|
||||
|
||||
function sliceHighlights(input: { releases: ParsedRelease[]; current?: string; previous?: string }) {
|
||||
const current = normalizeVersion(input.current)
|
||||
const previous = normalizeVersion(input.previous)
|
||||
const releases = input.releases
|
||||
|
||||
const start = (() => {
|
||||
if (!current) return 0
|
||||
const index = releases.findIndex((release) => normalizeVersion(release.tag) === current)
|
||||
return index === -1 ? 0 : index
|
||||
})()
|
||||
|
||||
const end = (() => {
|
||||
if (!previous) return releases.length
|
||||
const index = releases.findIndex((release, i) => i >= start && normalizeVersion(release.tag) === previous)
|
||||
return index === -1 ? releases.length : index
|
||||
})()
|
||||
|
||||
const highlights = releases.slice(start, end).flatMap((release) => release.highlights)
|
||||
const seen = new Set<string>()
|
||||
const unique = highlights.filter((highlight) => {
|
||||
const key = [highlight.title, highlight.description, highlight.media?.type ?? "", highlight.media?.src ?? ""].join(
|
||||
"\n",
|
||||
)
|
||||
if (seen.has(key)) return false
|
||||
seen.add(key)
|
||||
return true
|
||||
})
|
||||
return unique.slice(0, 3)
|
||||
}
|
||||
|
||||
export const { use: useHighlights, provider: HighlightsProvider } = createSimpleContext({
|
||||
name: "Highlights",
|
||||
gate: false,
|
||||
init: () => {
|
||||
const platform = usePlatform()
|
||||
const dialog = useDialog()
|
||||
const settings = useSettings()
|
||||
const [store, setStore, _, ready] = persisted("highlights.v1", createStore<Store>({ version: undefined }))
|
||||
|
||||
const [from, setFrom] = createSignal<string | undefined>(undefined)
|
||||
const [to, setTo] = createSignal<string | undefined>(undefined)
|
||||
const [timer, setTimer] = createSignal<ReturnType<typeof setTimeout> | undefined>(undefined)
|
||||
const state = { started: false }
|
||||
|
||||
const markSeen = () => {
|
||||
if (!platform.version) return
|
||||
setStore("version", platform.version)
|
||||
}
|
||||
|
||||
createEffect(() => {
|
||||
if (state.started) return
|
||||
if (!ready()) return
|
||||
if (!settings.ready()) return
|
||||
if (!platform.version) return
|
||||
state.started = true
|
||||
|
||||
const previous = store.version
|
||||
if (!previous) {
|
||||
setStore("version", platform.version)
|
||||
return
|
||||
}
|
||||
|
||||
if (previous === platform.version) return
|
||||
|
||||
setFrom(previous)
|
||||
setTo(platform.version)
|
||||
|
||||
if (!settings.general.releaseNotes()) {
|
||||
markSeen()
|
||||
return
|
||||
}
|
||||
|
||||
const fetcher = platform.fetch ?? fetch
|
||||
const controller = new AbortController()
|
||||
onCleanup(() => {
|
||||
controller.abort()
|
||||
const id = timer()
|
||||
if (id === undefined) return
|
||||
clearTimeout(id)
|
||||
})
|
||||
|
||||
fetcher(CHANGELOG_URL, {
|
||||
signal: controller.signal,
|
||||
headers: { Accept: "application/json" },
|
||||
})
|
||||
.then((response) => (response.ok ? (response.json() as Promise<unknown>) : undefined))
|
||||
.then((json) => {
|
||||
if (!json) return
|
||||
const releases = parseChangelog(json)
|
||||
if (!releases) return
|
||||
if (releases.length === 0) return
|
||||
const highlights = sliceHighlights({
|
||||
releases,
|
||||
current: platform.version,
|
||||
previous,
|
||||
})
|
||||
|
||||
if (controller.signal.aborted) return
|
||||
|
||||
if (highlights.length === 0) {
|
||||
markSeen()
|
||||
return
|
||||
}
|
||||
|
||||
const timer = setTimeout(() => {
|
||||
markSeen()
|
||||
dialog.show(() => <DialogReleaseNotes highlights={highlights} />)
|
||||
}, 500)
|
||||
setTimer(timer)
|
||||
})
|
||||
.catch(() => undefined)
|
||||
})
|
||||
|
||||
return {
|
||||
ready,
|
||||
from,
|
||||
to,
|
||||
get last() {
|
||||
return store.version
|
||||
},
|
||||
markSeen,
|
||||
}
|
||||
},
|
||||
})
|
||||
@@ -82,10 +82,6 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
|
||||
diffStyle: "split" as ReviewDiffStyle,
|
||||
panelOpened: true,
|
||||
},
|
||||
fileTree: {
|
||||
opened: false,
|
||||
width: 260,
|
||||
},
|
||||
session: {
|
||||
width: 600,
|
||||
},
|
||||
@@ -453,38 +449,6 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
|
||||
setStore("review", "diffStyle", diffStyle)
|
||||
},
|
||||
},
|
||||
fileTree: {
|
||||
opened: createMemo(() => store.fileTree?.opened ?? false),
|
||||
width: createMemo(() => store.fileTree?.width ?? 260),
|
||||
open() {
|
||||
if (!store.fileTree) {
|
||||
setStore("fileTree", { opened: true, width: 260 })
|
||||
return
|
||||
}
|
||||
setStore("fileTree", "opened", true)
|
||||
},
|
||||
close() {
|
||||
if (!store.fileTree) {
|
||||
setStore("fileTree", { opened: false, width: 260 })
|
||||
return
|
||||
}
|
||||
setStore("fileTree", "opened", false)
|
||||
},
|
||||
toggle() {
|
||||
if (!store.fileTree) {
|
||||
setStore("fileTree", { opened: true, width: 260 })
|
||||
return
|
||||
}
|
||||
setStore("fileTree", "opened", (x) => !x)
|
||||
},
|
||||
resize(width: number) {
|
||||
if (!store.fileTree) {
|
||||
setStore("fileTree", { opened: true, width })
|
||||
return
|
||||
}
|
||||
setStore("fileTree", "width", width)
|
||||
},
|
||||
},
|
||||
session: {
|
||||
width: createMemo(() => store.session?.width ?? 600),
|
||||
resize(width: number) {
|
||||
|
||||
@@ -1,20 +1,47 @@
|
||||
import { createStore } from "solid-js/store"
|
||||
import { batch, createMemo } from "solid-js"
|
||||
import { createStore, produce, reconcile } from "solid-js/store"
|
||||
import { batch, createEffect, createMemo, onCleanup } from "solid-js"
|
||||
import type { FileContent, FileNode, Model, Provider, File as FileStatus } from "@opencode-ai/sdk/v2"
|
||||
import { createSimpleContext } from "@opencode-ai/ui/context"
|
||||
import { useSDK } from "./sdk"
|
||||
import { useSync } from "./sync"
|
||||
import { base64Encode } from "@opencode-ai/util/encode"
|
||||
import { useProviders } from "@/hooks/use-providers"
|
||||
import { useModels } from "@/context/models"
|
||||
import { showToast } from "@opencode-ai/ui/toast"
|
||||
import { useLanguage } from "@/context/language"
|
||||
|
||||
export type LocalFile = FileNode &
|
||||
Partial<{
|
||||
loaded: boolean
|
||||
pinned: boolean
|
||||
expanded: boolean
|
||||
content: FileContent
|
||||
selection: { startLine: number; startChar: number; endLine: number; endChar: number }
|
||||
scrollTop: number
|
||||
view: "raw" | "diff-unified" | "diff-split"
|
||||
folded: string[]
|
||||
selectedChange: number
|
||||
status: FileStatus
|
||||
}>
|
||||
export type TextSelection = LocalFile["selection"]
|
||||
export type View = LocalFile["view"]
|
||||
|
||||
export type LocalModel = Omit<Model, "provider"> & {
|
||||
provider: Provider
|
||||
latest?: boolean
|
||||
}
|
||||
export type ModelKey = { providerID: string; modelID: string }
|
||||
|
||||
export type FileContext = { type: "file"; path: string; selection?: TextSelection }
|
||||
export type ContextItem = FileContext
|
||||
|
||||
export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
|
||||
name: "Local",
|
||||
init: () => {
|
||||
const sdk = useSDK()
|
||||
const sync = useSync()
|
||||
const providers = useProviders()
|
||||
const language = useLanguage()
|
||||
|
||||
function isModelValid(model: ModelKey) {
|
||||
const provider = providers.all().find((x) => x.id === model.providerID)
|
||||
@@ -219,10 +246,247 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
|
||||
}
|
||||
})()
|
||||
|
||||
const file = (() => {
|
||||
const [store, setStore] = createStore<{
|
||||
node: Record<string, LocalFile>
|
||||
}>({
|
||||
node: {}, // Object.fromEntries(sync.data.node.map((x) => [x.path, x])),
|
||||
})
|
||||
|
||||
const scope = createMemo(() => sdk.directory)
|
||||
createEffect(() => {
|
||||
scope()
|
||||
setStore("node", {})
|
||||
})
|
||||
|
||||
// const changeset = createMemo(() => new Set(sync.data.changes.map((f) => f.path)))
|
||||
// const changes = createMemo(() => Array.from(changeset()).sort((a, b) => a.localeCompare(b)))
|
||||
|
||||
// createEffect((prev: FileStatus[]) => {
|
||||
// const removed = prev.filter((p) => !sync.data.changes.find((c) => c.path === p.path))
|
||||
// for (const p of removed) {
|
||||
// setStore(
|
||||
// "node",
|
||||
// p.path,
|
||||
// produce((draft) => {
|
||||
// draft.status = undefined
|
||||
// draft.view = "raw"
|
||||
// }),
|
||||
// )
|
||||
// load(p.path)
|
||||
// }
|
||||
// for (const p of sync.data.changes) {
|
||||
// if (store.node[p.path] === undefined) {
|
||||
// fetch(p.path).then(() => {
|
||||
// if (store.node[p.path] === undefined) return
|
||||
// setStore("node", p.path, "status", p)
|
||||
// })
|
||||
// } else {
|
||||
// setStore("node", p.path, "status", p)
|
||||
// }
|
||||
// }
|
||||
// return sync.data.changes
|
||||
// }, sync.data.changes)
|
||||
|
||||
// const changed = (path: string) => {
|
||||
// const node = store.node[path]
|
||||
// if (node?.status) return true
|
||||
// const set = changeset()
|
||||
// if (set.has(path)) return true
|
||||
// for (const p of set) {
|
||||
// if (p.startsWith(path ? path + "/" : "")) return true
|
||||
// }
|
||||
// return false
|
||||
// }
|
||||
|
||||
// const resetNode = (path: string) => {
|
||||
// setStore("node", path, {
|
||||
// loaded: undefined,
|
||||
// pinned: undefined,
|
||||
// content: undefined,
|
||||
// selection: undefined,
|
||||
// scrollTop: undefined,
|
||||
// folded: undefined,
|
||||
// view: undefined,
|
||||
// selectedChange: undefined,
|
||||
// })
|
||||
// }
|
||||
|
||||
const relative = (path: string) => path.replace(sync.data.path.directory + "/", "")
|
||||
|
||||
const load = async (path: string) => {
|
||||
const directory = scope()
|
||||
const client = sdk.client
|
||||
const relativePath = relative(path)
|
||||
await client.file
|
||||
.read({ path: relativePath })
|
||||
.then((x) => {
|
||||
if (scope() !== directory) return
|
||||
if (!store.node[relativePath]) return
|
||||
setStore(
|
||||
"node",
|
||||
relativePath,
|
||||
produce((draft) => {
|
||||
draft.loaded = true
|
||||
draft.content = x.data
|
||||
}),
|
||||
)
|
||||
})
|
||||
.catch((e) => {
|
||||
if (scope() !== directory) return
|
||||
showToast({
|
||||
variant: "error",
|
||||
title: language.t("toast.file.loadFailed.title"),
|
||||
description: e.message,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const fetch = async (path: string) => {
|
||||
const relativePath = relative(path)
|
||||
const parent = relativePath.split("/").slice(0, -1).join("/")
|
||||
if (parent) {
|
||||
await list(parent)
|
||||
}
|
||||
}
|
||||
|
||||
const init = async (path: string) => {
|
||||
const relativePath = relative(path)
|
||||
if (!store.node[relativePath]) await fetch(path)
|
||||
if (store.node[relativePath]?.loaded) return
|
||||
return load(relativePath)
|
||||
}
|
||||
|
||||
const open = async (path: string, options?: { pinned?: boolean; view?: LocalFile["view"] }) => {
|
||||
const relativePath = relative(path)
|
||||
if (!store.node[relativePath]) await fetch(path)
|
||||
// setStore("opened", (x) => {
|
||||
// if (x.includes(relativePath)) return x
|
||||
// return [
|
||||
// ...opened()
|
||||
// .filter((x) => x.pinned)
|
||||
// .map((x) => x.path),
|
||||
// relativePath,
|
||||
// ]
|
||||
// })
|
||||
// setStore("active", relativePath)
|
||||
// context.addActive()
|
||||
if (options?.pinned) setStore("node", path, "pinned", true)
|
||||
if (options?.view && store.node[relativePath].view === undefined) setStore("node", path, "view", options.view)
|
||||
if (store.node[relativePath]?.loaded) return
|
||||
return load(relativePath)
|
||||
}
|
||||
|
||||
const list = async (path: string) => {
|
||||
const directory = scope()
|
||||
const client = sdk.client
|
||||
return client.file
|
||||
.list({ path: path + "/" })
|
||||
.then((x) => {
|
||||
if (scope() !== directory) return
|
||||
setStore(
|
||||
"node",
|
||||
produce((draft) => {
|
||||
x.data!.forEach((node) => {
|
||||
if (node.path in draft) return
|
||||
draft[node.path] = node
|
||||
})
|
||||
}),
|
||||
)
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
const searchFiles = (query: string) => sdk.client.find.files({ query, dirs: "false" }).then((x) => x.data!)
|
||||
const searchFilesAndDirectories = (query: string) =>
|
||||
sdk.client.find.files({ query, dirs: "true" }).then((x) => x.data!)
|
||||
|
||||
const unsub = sdk.event.listen((e) => {
|
||||
const event = e.details
|
||||
switch (event.type) {
|
||||
case "file.watcher.updated":
|
||||
const relativePath = relative(event.properties.file)
|
||||
if (relativePath.startsWith(".git/")) return
|
||||
if (store.node[relativePath]) load(relativePath)
|
||||
break
|
||||
}
|
||||
})
|
||||
onCleanup(unsub)
|
||||
|
||||
return {
|
||||
node: async (path: string) => {
|
||||
if (!store.node[path] || !store.node[path].loaded) {
|
||||
await init(path)
|
||||
}
|
||||
return store.node[path]
|
||||
},
|
||||
update: (path: string, node: LocalFile) => setStore("node", path, reconcile(node)),
|
||||
open,
|
||||
load,
|
||||
init,
|
||||
expand(path: string) {
|
||||
setStore("node", path, "expanded", true)
|
||||
if (store.node[path]?.loaded) return
|
||||
setStore("node", path, "loaded", true)
|
||||
list(path)
|
||||
},
|
||||
collapse(path: string) {
|
||||
setStore("node", path, "expanded", false)
|
||||
},
|
||||
select(path: string, selection: TextSelection | undefined) {
|
||||
setStore("node", path, "selection", selection)
|
||||
},
|
||||
scroll(path: string, scrollTop: number) {
|
||||
setStore("node", path, "scrollTop", scrollTop)
|
||||
},
|
||||
view(path: string): View {
|
||||
const n = store.node[path]
|
||||
return n && n.view ? n.view : "raw"
|
||||
},
|
||||
setView(path: string, view: View) {
|
||||
setStore("node", path, "view", view)
|
||||
},
|
||||
unfold(path: string, key: string) {
|
||||
setStore("node", path, "folded", (xs) => {
|
||||
const a = xs ?? []
|
||||
if (a.includes(key)) return a
|
||||
return [...a, key]
|
||||
})
|
||||
},
|
||||
fold(path: string, key: string) {
|
||||
setStore("node", path, "folded", (xs) => (xs ?? []).filter((k) => k !== key))
|
||||
},
|
||||
folded(path: string) {
|
||||
const n = store.node[path]
|
||||
return n && n.folded ? n.folded : []
|
||||
},
|
||||
changeIndex(path: string) {
|
||||
return store.node[path]?.selectedChange
|
||||
},
|
||||
setChangeIndex(path: string, index: number | undefined) {
|
||||
setStore("node", path, "selectedChange", index)
|
||||
},
|
||||
// changes,
|
||||
// changed,
|
||||
children(path: string) {
|
||||
return Object.values(store.node).filter(
|
||||
(x) =>
|
||||
x.path.startsWith(path) &&
|
||||
x.path !== path &&
|
||||
!x.path.replace(new RegExp(`^${path + "/"}`), "").includes("/"),
|
||||
)
|
||||
},
|
||||
searchFiles,
|
||||
searchFilesAndDirectories,
|
||||
relative,
|
||||
}
|
||||
})()
|
||||
|
||||
const result = {
|
||||
slug: createMemo(() => base64Encode(sdk.directory)),
|
||||
model,
|
||||
agent,
|
||||
file,
|
||||
}
|
||||
return result
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createOpencodeClient } from "@opencode-ai/sdk/v2/client"
|
||||
import { createSimpleContext } from "@opencode-ai/ui/context"
|
||||
import { batch, createEffect, createMemo, onCleanup } from "solid-js"
|
||||
import { batch, createEffect, createMemo, createSignal, onCleanup } from "solid-js"
|
||||
import { createStore } from "solid-js/store"
|
||||
import { usePlatform } from "@/context/platform"
|
||||
import { Persist, persisted } from "@/utils/persist"
|
||||
@@ -40,17 +40,12 @@ export const { use: useServer, provider: ServerProvider } = createSimpleContext(
|
||||
}),
|
||||
)
|
||||
|
||||
const [state, setState] = createStore({
|
||||
active: "",
|
||||
healthy: undefined as boolean | undefined,
|
||||
})
|
||||
|
||||
const healthy = () => state.healthy
|
||||
const [active, setActiveRaw] = createSignal("")
|
||||
|
||||
function setActive(input: string) {
|
||||
const url = normalizeServerUrl(input)
|
||||
if (!url) return
|
||||
setState("active", url)
|
||||
setActiveRaw(url)
|
||||
}
|
||||
|
||||
function add(input: string) {
|
||||
@@ -59,7 +54,7 @@ export const { use: useServer, provider: ServerProvider } = createSimpleContext(
|
||||
|
||||
const fallback = normalizeServerUrl(props.defaultUrl)
|
||||
if (fallback && url === fallback) {
|
||||
setState("active", url)
|
||||
setActiveRaw(url)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -67,7 +62,7 @@ export const { use: useServer, provider: ServerProvider } = createSimpleContext(
|
||||
if (!store.list.includes(url)) {
|
||||
setStore("list", store.list.length, url)
|
||||
}
|
||||
setState("active", url)
|
||||
setActiveRaw(url)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -76,23 +71,25 @@ export const { use: useServer, provider: ServerProvider } = createSimpleContext(
|
||||
if (!url) return
|
||||
|
||||
const list = store.list.filter((x) => x !== url)
|
||||
const next = state.active === url ? (list[0] ?? normalizeServerUrl(props.defaultUrl) ?? "") : state.active
|
||||
const next = active() === url ? (list[0] ?? normalizeServerUrl(props.defaultUrl) ?? "") : active()
|
||||
|
||||
batch(() => {
|
||||
setStore("list", list)
|
||||
setState("active", next)
|
||||
setActiveRaw(next)
|
||||
})
|
||||
}
|
||||
|
||||
createEffect(() => {
|
||||
if (!ready()) return
|
||||
if (state.active) return
|
||||
if (active()) return
|
||||
const url = normalizeServerUrl(props.defaultUrl)
|
||||
if (!url) return
|
||||
setState("active", url)
|
||||
setActiveRaw(url)
|
||||
})
|
||||
|
||||
const isReady = createMemo(() => ready() && !!state.active)
|
||||
const isReady = createMemo(() => ready() && !!active())
|
||||
|
||||
const [healthy, setHealthy] = createSignal<boolean | undefined>(undefined)
|
||||
|
||||
const check = (url: string) => {
|
||||
const sdk = createOpencodeClient({
|
||||
@@ -107,10 +104,10 @@ export const { use: useServer, provider: ServerProvider } = createSimpleContext(
|
||||
}
|
||||
|
||||
createEffect(() => {
|
||||
const url = state.active
|
||||
const url = active()
|
||||
if (!url) return
|
||||
|
||||
setState("healthy", undefined)
|
||||
setHealthy(undefined)
|
||||
|
||||
let alive = true
|
||||
let busy = false
|
||||
@@ -121,7 +118,7 @@ export const { use: useServer, provider: ServerProvider } = createSimpleContext(
|
||||
void check(url)
|
||||
.then((next) => {
|
||||
if (!alive) return
|
||||
setState("healthy", next)
|
||||
setHealthy(next)
|
||||
})
|
||||
.finally(() => {
|
||||
busy = false
|
||||
@@ -137,7 +134,7 @@ export const { use: useServer, provider: ServerProvider } = createSimpleContext(
|
||||
})
|
||||
})
|
||||
|
||||
const origin = createMemo(() => projectsKey(state.active))
|
||||
const origin = createMemo(() => projectsKey(active()))
|
||||
const projectsList = createMemo(() => store.projects[origin()] ?? [])
|
||||
const isLocal = createMemo(() => origin() === "local")
|
||||
|
||||
@@ -146,10 +143,10 @@ export const { use: useServer, provider: ServerProvider } = createSimpleContext(
|
||||
healthy,
|
||||
isLocal,
|
||||
get url() {
|
||||
return state.active
|
||||
return active()
|
||||
},
|
||||
get name() {
|
||||
return serverDisplayName(state.active)
|
||||
return serverDisplayName(active())
|
||||
},
|
||||
get list() {
|
||||
return store.list
|
||||
|
||||
@@ -18,7 +18,6 @@ export interface SoundSettings {
|
||||
export interface Settings {
|
||||
general: {
|
||||
autoSave: boolean
|
||||
releaseNotes: boolean
|
||||
}
|
||||
appearance: {
|
||||
fontSize: number
|
||||
@@ -35,7 +34,6 @@ export interface Settings {
|
||||
const defaultSettings: Settings = {
|
||||
general: {
|
||||
autoSave: true,
|
||||
releaseNotes: true,
|
||||
},
|
||||
appearance: {
|
||||
fontSize: 14,
|
||||
@@ -99,10 +97,6 @@ export const { use: useSettings, provider: SettingsProvider } = createSimpleCont
|
||||
setAutoSave(value: boolean) {
|
||||
setStore("general", "autoSave", value)
|
||||
},
|
||||
releaseNotes: createMemo(() => store.general?.releaseNotes ?? defaultSettings.general.releaseNotes),
|
||||
setReleaseNotes(value: boolean) {
|
||||
setStore("general", "releaseNotes", value)
|
||||
},
|
||||
},
|
||||
appearance: {
|
||||
fontSize: createMemo(() => store.appearance?.fontSize ?? defaultSettings.appearance.fontSize),
|
||||
|
||||
@@ -16,6 +16,7 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
|
||||
const sdk = useSDK()
|
||||
|
||||
type Child = ReturnType<(typeof globalSync)["child"]>
|
||||
type Store = Child[0]
|
||||
type Setter = Child[1]
|
||||
|
||||
const current = createMemo(() => globalSync.child(sdk.directory))
|
||||
@@ -42,6 +43,18 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
|
||||
return Math.ceil(count / chunk) * chunk
|
||||
}
|
||||
|
||||
const hydrateMessages = (directory: string, store: Store, sessionID: string) => {
|
||||
const key = keyFor(directory, sessionID)
|
||||
if (meta.limit[key] !== undefined) return
|
||||
|
||||
const messages = store.message[sessionID]
|
||||
if (!messages) return
|
||||
|
||||
const limit = limitFor(messages.length)
|
||||
setMeta("limit", key, limit)
|
||||
setMeta("complete", key, messages.length < limit)
|
||||
}
|
||||
|
||||
const loadMessages = async (input: {
|
||||
directory: string
|
||||
client: typeof sdk.client
|
||||
@@ -137,20 +150,21 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
|
||||
const directory = sdk.directory
|
||||
const client = sdk.client
|
||||
const [store, setStore] = globalSync.child(directory)
|
||||
const key = keyFor(directory, sessionID)
|
||||
const hasSession = (() => {
|
||||
const match = Binary.search(store.session, sessionID, (s) => s.id)
|
||||
return match.found
|
||||
})()
|
||||
|
||||
hydrateMessages(directory, store, sessionID)
|
||||
|
||||
const hasMessages = store.message[sessionID] !== undefined
|
||||
const hydrated = meta.limit[key] !== undefined
|
||||
if (hasSession && hasMessages && hydrated) return
|
||||
if (hasSession && hasMessages) return
|
||||
|
||||
const key = keyFor(directory, sessionID)
|
||||
const pending = inflight.get(key)
|
||||
if (pending) return pending
|
||||
|
||||
const count = store.message[sessionID]?.length ?? 0
|
||||
const limit = hydrated ? (meta.limit[key] ?? chunk) : limitFor(count)
|
||||
const limit = meta.limit[key] ?? chunk
|
||||
|
||||
const sessionReq = hasSession
|
||||
? Promise.resolve()
|
||||
@@ -170,16 +184,15 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
|
||||
)
|
||||
})
|
||||
|
||||
const messagesReq =
|
||||
hasMessages && hydrated
|
||||
? Promise.resolve()
|
||||
: loadMessages({
|
||||
directory,
|
||||
client,
|
||||
setStore,
|
||||
sessionID,
|
||||
limit,
|
||||
})
|
||||
const messagesReq = hasMessages
|
||||
? Promise.resolve()
|
||||
: loadMessages({
|
||||
directory,
|
||||
client,
|
||||
setStore,
|
||||
sessionID,
|
||||
limit,
|
||||
})
|
||||
|
||||
const promise = Promise.all([sessionReq, messagesReq])
|
||||
.then(() => {})
|
||||
|
||||
@@ -8,7 +8,6 @@ export const dict = {
|
||||
"command.category.theme": "سمة",
|
||||
"command.category.language": "لغة",
|
||||
"command.category.file": "ملف",
|
||||
"command.category.context": "سياق",
|
||||
"command.category.terminal": "محطة طرفية",
|
||||
"command.category.model": "نموذج",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -43,10 +42,7 @@ export const dict = {
|
||||
"command.session.new": "جلسة جديدة",
|
||||
"command.file.open": "فتح ملف",
|
||||
"command.file.open.description": "البحث في الملفات والأوامر",
|
||||
"command.context.addSelection": "إضافة التحديد إلى السياق",
|
||||
"command.context.addSelection.description": "إضافة الأسطر المحددة من الملف الحالي",
|
||||
"command.terminal.toggle": "تبديل المحطة الطرفية",
|
||||
"command.fileTree.toggle": "تبديل شجرة الملفات",
|
||||
"command.review.toggle": "تبديل المراجعة",
|
||||
"command.terminal.new": "محطة طرفية جديدة",
|
||||
"command.terminal.new.description": "إنشاء علامة تبويب جديدة للمحطة الطرفية",
|
||||
@@ -141,8 +137,6 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "تم توصيل {{provider}}",
|
||||
"provider.connect.toast.connected.description": "نماذج {{provider}} متاحة الآن للاستخدام.",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "تم فصل {{provider}}",
|
||||
"provider.disconnect.toast.disconnected.description": "لم تعد نماذج {{provider}} متاحة.",
|
||||
"model.tag.free": "مجاني",
|
||||
"model.tag.latest": "الأحدث",
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
@@ -165,8 +159,6 @@ export const dict = {
|
||||
"common.loading": "جارٍ التحميل",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "إلغاء",
|
||||
"common.connect": "اتصال",
|
||||
"common.disconnect": "قطع الاتصال",
|
||||
"common.submit": "إرسال",
|
||||
"common.save": "حفظ",
|
||||
"common.saving": "جارٍ الحفظ...",
|
||||
@@ -175,8 +167,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "أدخل أمر shell...",
|
||||
"prompt.placeholder.normal": 'اسأل أي شيء... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "لخّص التعليقات…",
|
||||
"prompt.placeholder.summarizeComment": "لخّص التعليق…",
|
||||
"prompt.mode.shell": "Shell",
|
||||
"prompt.mode.shell.exit": "esc للخروج",
|
||||
|
||||
@@ -280,9 +270,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "لون",
|
||||
"dialog.project.edit.color.select": "اختر لون {{color}}",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "سكريبت بدء تشغيل مساحة العمل",
|
||||
"dialog.project.edit.worktree.startup.description": "يتم تشغيله بعد إنشاء مساحة عمل جديدة (شجرة عمل).",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "مثال: bun install",
|
||||
"context.breakdown.title": "تفصيل السياق",
|
||||
"context.breakdown.note": 'تفصيل تقريبي لرموز الإدخال. يشمل "أخرى" تعريفات الأدوات والنفقات العامة.',
|
||||
"context.breakdown.system": "النظام",
|
||||
@@ -348,9 +335,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "فشل تحميل الملف",
|
||||
|
||||
"toast.file.listFailed.title": "فشل سرد الملفات",
|
||||
"toast.context.noLineSelection.title": "لا يوجد تحديد للأسطر",
|
||||
"toast.context.noLineSelection.description": "حدد نطاق أسطر في تبويب ملف أولاً.",
|
||||
"toast.session.share.copyFailed.title": "فشل نسخ عنوان URL إلى الحافظة",
|
||||
"toast.session.share.success.title": "تمت مشاركة الجلسة",
|
||||
"toast.session.share.success.description": "تم نسخ عنوان URL للمشاركة إلى الحافظة!",
|
||||
@@ -424,13 +408,8 @@ export const dict = {
|
||||
"session.tab.context": "سياق",
|
||||
"session.panel.reviewAndFiles": "المراجعة والملفات",
|
||||
"session.review.filesChanged": "تم تغيير {{count}} ملفات",
|
||||
"session.review.change.one": "تغيير",
|
||||
"session.review.change.other": "تغييرات",
|
||||
"session.review.loadingChanges": "جارٍ تحميل التغييرات...",
|
||||
"session.review.empty": "لا توجد تغييرات في هذه الجلسة بعد",
|
||||
"session.review.noChanges": "لا توجد تغييرات",
|
||||
"session.files.selectToOpen": "اختر ملفًا لفتحه",
|
||||
"session.files.all": "كل الملفات",
|
||||
"session.messages.renderEarlier": "عرض الرسائل السابقة",
|
||||
"session.messages.loadingEarlier": "جارٍ تحميل الرسائل السابقة...",
|
||||
"session.messages.loadEarlier": "تحميل الرسائل السابقة",
|
||||
@@ -504,9 +483,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "الجلسات الحديثة",
|
||||
"sidebar.project.viewAllSessions": "عرض جميع الجلسات",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "سطح المكتب",
|
||||
"settings.section.server": "الخادم",
|
||||
"settings.tab.general": "عام",
|
||||
"settings.tab.shortcuts": "اختصارات",
|
||||
|
||||
@@ -528,7 +505,6 @@ export const dict = {
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
@@ -614,13 +590,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "الموفرون",
|
||||
"settings.providers.description": "ستكون إعدادات الموفر قابلة للتكوين هنا.",
|
||||
"settings.providers.section.connected": "الموفرون المتصلون",
|
||||
"settings.providers.connected.empty": "لا يوجد موفرون متصلون",
|
||||
"settings.providers.section.popular": "الموفرون الشائعون",
|
||||
"settings.providers.tag.environment": "البيئة",
|
||||
"settings.providers.tag.config": "التكوين",
|
||||
"settings.providers.tag.custom": "مخصص",
|
||||
"settings.providers.tag.other": "أخرى",
|
||||
"settings.models.title": "النماذج",
|
||||
"settings.models.description": "ستكون إعدادات النموذج قابلة للتكوين هنا.",
|
||||
"settings.agents.title": "الوكلاء",
|
||||
@@ -688,7 +657,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "فشل إعادة تعيين مساحة العمل",
|
||||
"workspace.reset.success.title": "تمت إعادة تعيين مساحة العمل",
|
||||
"workspace.reset.success.description": "مساحة العمل تطابق الآن الفرع الافتراضي.",
|
||||
"workspace.error.stillPreparing": "مساحة العمل لا تزال قيد الإعداد",
|
||||
"workspace.status.checking": "التحقق من التغييرات غير المدمجة...",
|
||||
"workspace.status.error": "تعذر التحقق من حالة git.",
|
||||
"workspace.status.clean": "لم يتم اكتشاف تغييرات غير مدمجة.",
|
||||
|
||||
@@ -8,7 +8,6 @@ export const dict = {
|
||||
"command.category.theme": "Tema",
|
||||
"command.category.language": "Idioma",
|
||||
"command.category.file": "Arquivo",
|
||||
"command.category.context": "Contexto",
|
||||
"command.category.terminal": "Terminal",
|
||||
"command.category.model": "Modelo",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -43,10 +42,7 @@ export const dict = {
|
||||
"command.session.new": "Nova sessão",
|
||||
"command.file.open": "Abrir arquivo",
|
||||
"command.file.open.description": "Buscar arquivos e comandos",
|
||||
"command.context.addSelection": "Adicionar seleção ao contexto",
|
||||
"command.context.addSelection.description": "Adicionar as linhas selecionadas do arquivo atual",
|
||||
"command.terminal.toggle": "Alternar terminal",
|
||||
"command.fileTree.toggle": "Alternar árvore de arquivos",
|
||||
"command.review.toggle": "Alternar revisão",
|
||||
"command.terminal.new": "Novo terminal",
|
||||
"command.terminal.new.description": "Criar uma nova aba de terminal",
|
||||
@@ -141,8 +137,6 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "{{provider}} conectado",
|
||||
"provider.connect.toast.connected.description": "Modelos do {{provider}} agora estão disponíveis para uso.",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "{{provider}} desconectado",
|
||||
"provider.disconnect.toast.disconnected.description": "Os modelos de {{provider}} não estão mais disponíveis.",
|
||||
"model.tag.free": "Grátis",
|
||||
"model.tag.latest": "Mais recente",
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
@@ -165,8 +159,6 @@ export const dict = {
|
||||
"common.loading": "Carregando",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "Cancelar",
|
||||
"common.connect": "Conectar",
|
||||
"common.disconnect": "Desconectar",
|
||||
"common.submit": "Enviar",
|
||||
"common.save": "Salvar",
|
||||
"common.saving": "Salvando...",
|
||||
@@ -175,8 +167,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "Digite comando do shell...",
|
||||
"prompt.placeholder.normal": 'Pergunte qualquer coisa... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "Resumir comentários…",
|
||||
"prompt.placeholder.summarizeComment": "Resumir comentário…",
|
||||
"prompt.mode.shell": "Shell",
|
||||
"prompt.mode.shell.exit": "esc para sair",
|
||||
|
||||
@@ -233,8 +223,6 @@ export const dict = {
|
||||
"dialog.mcp.description": "{{enabled}} de {{total}} habilitados",
|
||||
"dialog.mcp.empty": "Nenhum MCP configurado",
|
||||
|
||||
"dialog.lsp.empty": "LSPs detectados automaticamente pelos tipos de arquivo",
|
||||
"dialog.plugins.empty": "Plugins configurados em opencode.json",
|
||||
"mcp.status.connected": "conectado",
|
||||
"mcp.status.failed": "falhou",
|
||||
"mcp.status.needs_auth": "precisa de autenticação",
|
||||
@@ -263,12 +251,6 @@ export const dict = {
|
||||
"dialog.server.default.clear": "Limpar",
|
||||
"dialog.server.action.remove": "Remover servidor",
|
||||
|
||||
"dialog.server.menu.edit": "Editar",
|
||||
"dialog.server.menu.default": "Definir como padrão",
|
||||
"dialog.server.menu.defaultRemove": "Remover padrão",
|
||||
"dialog.server.menu.delete": "Excluir",
|
||||
"dialog.server.current": "Servidor atual",
|
||||
"dialog.server.status.default": "Padrão",
|
||||
"dialog.project.edit.title": "Editar projeto",
|
||||
"dialog.project.edit.name": "Nome",
|
||||
"dialog.project.edit.icon": "Ícone",
|
||||
@@ -347,9 +329,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "Falha ao carregar arquivo",
|
||||
|
||||
"toast.file.listFailed.title": "Falha ao listar arquivos",
|
||||
"toast.context.noLineSelection.title": "Nenhuma seleção de linhas",
|
||||
"toast.context.noLineSelection.description": "Selecione primeiro um intervalo de linhas em uma aba de arquivo.",
|
||||
"toast.session.share.copyFailed.title": "Falha ao copiar URL para a área de transferência",
|
||||
"toast.session.share.success.title": "Sessão compartilhada",
|
||||
"toast.session.share.success.description": "URL compartilhada copiada para a área de transferência!",
|
||||
@@ -425,13 +404,8 @@ export const dict = {
|
||||
"session.tab.context": "Contexto",
|
||||
"session.panel.reviewAndFiles": "Revisão e arquivos",
|
||||
"session.review.filesChanged": "{{count}} Arquivos Alterados",
|
||||
"session.review.change.one": "Alteração",
|
||||
"session.review.change.other": "Alterações",
|
||||
"session.review.loadingChanges": "Carregando alterações...",
|
||||
"session.review.empty": "Nenhuma alteração nesta sessão ainda",
|
||||
"session.review.noChanges": "Sem alterações",
|
||||
"session.files.selectToOpen": "Selecione um arquivo para abrir",
|
||||
"session.files.all": "Todos os arquivos",
|
||||
"session.messages.renderEarlier": "Renderizar mensagens anteriores",
|
||||
"session.messages.loadingEarlier": "Carregando mensagens anteriores...",
|
||||
"session.messages.loadEarlier": "Carregar mensagens anteriores",
|
||||
@@ -508,9 +482,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "Sessões recentes",
|
||||
"sidebar.project.viewAllSessions": "Ver todas as sessões",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "Desktop",
|
||||
"settings.section.server": "Servidor",
|
||||
"settings.tab.general": "Geral",
|
||||
"settings.tab.shortcuts": "Atalhos",
|
||||
|
||||
@@ -532,7 +504,6 @@ export const dict = {
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
@@ -620,13 +591,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "Provedores",
|
||||
"settings.providers.description": "Configurações de provedores estarão disponíveis aqui.",
|
||||
"settings.providers.section.connected": "Provedores conectados",
|
||||
"settings.providers.connected.empty": "Nenhum provedor conectado",
|
||||
"settings.providers.section.popular": "Provedores populares",
|
||||
"settings.providers.tag.environment": "Ambiente",
|
||||
"settings.providers.tag.config": "Configuração",
|
||||
"settings.providers.tag.custom": "Personalizado",
|
||||
"settings.providers.tag.other": "Outro",
|
||||
"settings.models.title": "Modelos",
|
||||
"settings.models.description": "Configurações de modelos estarão disponíveis aqui.",
|
||||
"settings.agents.title": "Agentes",
|
||||
@@ -694,7 +658,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "Falha ao redefinir espaço de trabalho",
|
||||
"workspace.reset.success.title": "Espaço de trabalho redefinido",
|
||||
"workspace.reset.success.description": "Espaço de trabalho agora corresponde ao branch padrão.",
|
||||
"workspace.error.stillPreparing": "O espaço de trabalho ainda está sendo preparado",
|
||||
"workspace.status.checking": "Verificando alterações não mescladas...",
|
||||
"workspace.status.error": "Não foi possível verificar o status do git.",
|
||||
"workspace.status.clean": "Nenhuma alteração não mesclada detectada.",
|
||||
|
||||
@@ -8,7 +8,6 @@ export const dict = {
|
||||
"command.category.theme": "Tema",
|
||||
"command.category.language": "Sprog",
|
||||
"command.category.file": "Fil",
|
||||
"command.category.context": "Kontekst",
|
||||
"command.category.terminal": "Terminal",
|
||||
"command.category.model": "Model",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -16,7 +15,6 @@ export const dict = {
|
||||
"command.category.permissions": "Tilladelser",
|
||||
"command.category.workspace": "Arbejdsområde",
|
||||
|
||||
"command.category.settings": "Indstillinger",
|
||||
"theme.scheme.system": "System",
|
||||
"theme.scheme.light": "Lys",
|
||||
"theme.scheme.dark": "Mørk",
|
||||
@@ -25,7 +23,6 @@ export const dict = {
|
||||
"command.project.open": "Åbn projekt",
|
||||
"command.provider.connect": "Tilslut udbyder",
|
||||
"command.server.switch": "Skift server",
|
||||
"command.settings.open": "Åbn indstillinger",
|
||||
"command.session.previous": "Forrige session",
|
||||
"command.session.next": "Næste session",
|
||||
"command.session.archive": "Arkivér session",
|
||||
@@ -43,10 +40,7 @@ export const dict = {
|
||||
"command.session.new": "Ny session",
|
||||
"command.file.open": "Åbn fil",
|
||||
"command.file.open.description": "Søg i filer og kommandoer",
|
||||
"command.context.addSelection": "Tilføj markering til kontekst",
|
||||
"command.context.addSelection.description": "Tilføj markerede linjer fra den aktuelle fil",
|
||||
"command.terminal.toggle": "Skift terminal",
|
||||
"command.fileTree.toggle": "Skift filtræ",
|
||||
"command.review.toggle": "Skift gennemgang",
|
||||
"command.terminal.new": "Ny terminal",
|
||||
"command.terminal.new.description": "Opret en ny terminalfane",
|
||||
@@ -123,7 +117,6 @@ export const dict = {
|
||||
"provider.connect.opencodeZen.line2":
|
||||
"Med en enkelt API-nøgle får du adgang til modeller som Claude, GPT, Gemini, GLM og flere.",
|
||||
"provider.connect.opencodeZen.visit.prefix": "Besøg ",
|
||||
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
|
||||
"provider.connect.opencodeZen.visit.suffix": " for at hente din API-nøgle.",
|
||||
"provider.connect.oauth.code.visit.prefix": "Besøg ",
|
||||
"provider.connect.oauth.code.visit.link": "dette link",
|
||||
@@ -141,32 +134,13 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "{{provider}} forbundet",
|
||||
"provider.connect.toast.connected.description": "{{provider}} modeller er nu tilgængelige.",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "{{provider}} frakoblet",
|
||||
"provider.disconnect.toast.disconnected.description": "Modeller fra {{provider}} er ikke længere tilgængelige.",
|
||||
"model.tag.free": "Gratis",
|
||||
"model.tag.latest": "Nyeste",
|
||||
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
"model.provider.openai": "OpenAI",
|
||||
"model.provider.google": "Google",
|
||||
"model.provider.xai": "xAI",
|
||||
"model.provider.meta": "Meta",
|
||||
"model.input.text": "tekst",
|
||||
"model.input.image": "billede",
|
||||
"model.input.audio": "lyd",
|
||||
"model.input.video": "video",
|
||||
"model.input.pdf": "pdf",
|
||||
"model.tooltip.allows": "Tillader: {{inputs}}",
|
||||
"model.tooltip.reasoning.allowed": "Tillader tænkning",
|
||||
"model.tooltip.reasoning.none": "Ingen tænkning",
|
||||
"model.tooltip.context": "Kontekstgrænse {{limit}}",
|
||||
"common.search.placeholder": "Søg",
|
||||
"common.goBack": "Gå tilbage",
|
||||
"common.loading": "Indlæser",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "Annuller",
|
||||
"common.connect": "Forbind",
|
||||
"common.disconnect": "Frakobl",
|
||||
"common.submit": "Indsend",
|
||||
"common.save": "Gem",
|
||||
"common.saving": "Gemmer...",
|
||||
@@ -175,8 +149,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "Indtast shell-kommando...",
|
||||
"prompt.placeholder.normal": 'Spørg om hvad som helst... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "Opsummér kommentarer…",
|
||||
"prompt.placeholder.summarizeComment": "Opsummér kommentar…",
|
||||
"prompt.mode.shell": "Shell",
|
||||
"prompt.mode.shell.exit": "esc for at afslutte",
|
||||
|
||||
@@ -280,9 +252,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "Farve",
|
||||
"dialog.project.edit.color.select": "Vælg farven {{color}}",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "Opstartsscript for arbejdsområde",
|
||||
"dialog.project.edit.worktree.startup.description": "Køres efter oprettelse af et nyt arbejdsområde (worktree).",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "f.eks. bun install",
|
||||
"context.breakdown.title": "Kontekstfordeling",
|
||||
"context.breakdown.note":
|
||||
'Omtrentlig fordeling af input-tokens. "Andre" inkluderer værktøjsdefinitioner og overhead.',
|
||||
@@ -349,9 +318,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "Kunne ikke indlæse fil",
|
||||
|
||||
"toast.file.listFailed.title": "Kunne ikke liste filer",
|
||||
"toast.context.noLineSelection.title": "Ingen linjevalg",
|
||||
"toast.context.noLineSelection.description": "Vælg først et linjeinterval i en filfane.",
|
||||
"toast.session.share.copyFailed.title": "Kunne ikke kopiere URL til udklipsholder",
|
||||
"toast.session.share.success.title": "Session delt",
|
||||
"toast.session.share.success.description": "Delings-URL kopieret til udklipsholder!",
|
||||
@@ -426,19 +392,13 @@ export const dict = {
|
||||
"session.tab.context": "Kontekst",
|
||||
"session.panel.reviewAndFiles": "Gennemgang og filer",
|
||||
"session.review.filesChanged": "{{count}} Filer ændret",
|
||||
"session.review.change.one": "Ændring",
|
||||
"session.review.change.other": "Ændringer",
|
||||
"session.review.loadingChanges": "Indlæser ændringer...",
|
||||
"session.review.empty": "Ingen ændringer i denne session endnu",
|
||||
"session.review.noChanges": "Ingen ændringer",
|
||||
"session.files.selectToOpen": "Vælg en fil at åbne",
|
||||
"session.files.all": "Alle filer",
|
||||
"session.messages.renderEarlier": "Vis tidligere beskeder",
|
||||
"session.messages.loadingEarlier": "Indlæser tidligere beskeder...",
|
||||
"session.messages.loadEarlier": "Indlæs tidligere beskeder",
|
||||
"session.messages.loading": "Indlæser beskeder...",
|
||||
|
||||
"session.messages.jumpToLatest": "Gå til seneste",
|
||||
"session.context.addToContext": "Tilføj {{selection}} til kontekst",
|
||||
|
||||
"session.new.worktree.main": "Hovedgren",
|
||||
@@ -480,8 +440,6 @@ export const dict = {
|
||||
"terminal.title.numbered": "Terminal {{number}}",
|
||||
"terminal.close": "Luk terminal",
|
||||
|
||||
"terminal.connectionLost.title": "Forbindelse mistet",
|
||||
"terminal.connectionLost.description": "Terminalforbindelsen blev afbrudt. Dette kan ske, når serveren genstarter.",
|
||||
"common.closeTab": "Luk fane",
|
||||
"common.dismiss": "Afvis",
|
||||
"common.requestFailed": "Forespørgsel mislykkedes",
|
||||
@@ -495,8 +453,6 @@ export const dict = {
|
||||
"common.edit": "Rediger",
|
||||
"common.loadMore": "Indlæs flere",
|
||||
|
||||
"common.key.esc": "ESC",
|
||||
"sidebar.menu.toggle": "Skift menu",
|
||||
"sidebar.nav.projectsAndSessions": "Projekter og sessioner",
|
||||
"sidebar.settings": "Indstillinger",
|
||||
"sidebar.help": "Hjælp",
|
||||
@@ -508,9 +464,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "Seneste sessioner",
|
||||
"sidebar.project.viewAllSessions": "Vis alle sessioner",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "Desktop",
|
||||
"settings.section.server": "Server",
|
||||
"settings.tab.general": "Generelt",
|
||||
"settings.tab.shortcuts": "Genveje",
|
||||
|
||||
@@ -527,63 +481,6 @@ export const dict = {
|
||||
"settings.general.row.font.title": "Skrifttype",
|
||||
"settings.general.row.font.description": "Tilpas mono-skrifttypen brugt i kodeblokke",
|
||||
|
||||
"font.option.ibmPlexMono": "IBM Plex Mono",
|
||||
"font.option.cascadiaCode": "Cascadia Code",
|
||||
"font.option.firaCode": "Fira Code",
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
"font.option.sourceCodePro": "Source Code Pro",
|
||||
"font.option.ubuntuMono": "Ubuntu Mono",
|
||||
"sound.option.alert01": "Alarm 01",
|
||||
"sound.option.alert02": "Alarm 02",
|
||||
"sound.option.alert03": "Alarm 03",
|
||||
"sound.option.alert04": "Alarm 04",
|
||||
"sound.option.alert05": "Alarm 05",
|
||||
"sound.option.alert06": "Alarm 06",
|
||||
"sound.option.alert07": "Alarm 07",
|
||||
"sound.option.alert08": "Alarm 08",
|
||||
"sound.option.alert09": "Alarm 09",
|
||||
"sound.option.alert10": "Alarm 10",
|
||||
"sound.option.bipbop01": "Bip-bop 01",
|
||||
"sound.option.bipbop02": "Bip-bop 02",
|
||||
"sound.option.bipbop03": "Bip-bop 03",
|
||||
"sound.option.bipbop04": "Bip-bop 04",
|
||||
"sound.option.bipbop05": "Bip-bop 05",
|
||||
"sound.option.bipbop06": "Bip-bop 06",
|
||||
"sound.option.bipbop07": "Bip-bop 07",
|
||||
"sound.option.bipbop08": "Bip-bop 08",
|
||||
"sound.option.bipbop09": "Bip-bop 09",
|
||||
"sound.option.bipbop10": "Bip-bop 10",
|
||||
"sound.option.staplebops01": "Staplebops 01",
|
||||
"sound.option.staplebops02": "Staplebops 02",
|
||||
"sound.option.staplebops03": "Staplebops 03",
|
||||
"sound.option.staplebops04": "Staplebops 04",
|
||||
"sound.option.staplebops05": "Staplebops 05",
|
||||
"sound.option.staplebops06": "Staplebops 06",
|
||||
"sound.option.staplebops07": "Staplebops 07",
|
||||
"sound.option.nope01": "Nej 01",
|
||||
"sound.option.nope02": "Nej 02",
|
||||
"sound.option.nope03": "Nej 03",
|
||||
"sound.option.nope04": "Nej 04",
|
||||
"sound.option.nope05": "Nej 05",
|
||||
"sound.option.nope06": "Nej 06",
|
||||
"sound.option.nope07": "Nej 07",
|
||||
"sound.option.nope08": "Nej 08",
|
||||
"sound.option.nope09": "Nej 09",
|
||||
"sound.option.nope10": "Nej 10",
|
||||
"sound.option.nope11": "Nej 11",
|
||||
"sound.option.nope12": "Nej 12",
|
||||
"sound.option.yup01": "Ja 01",
|
||||
"sound.option.yup02": "Ja 02",
|
||||
"sound.option.yup03": "Ja 03",
|
||||
"sound.option.yup04": "Ja 04",
|
||||
"sound.option.yup05": "Ja 05",
|
||||
"sound.option.yup06": "Ja 06",
|
||||
"settings.general.notifications.agent.title": "Agent",
|
||||
"settings.general.notifications.agent.description":
|
||||
"Vis systemmeddelelse når agenten er færdig eller kræver opmærksomhed",
|
||||
@@ -619,13 +516,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "Udbydere",
|
||||
"settings.providers.description": "Udbyderindstillinger vil kunne konfigureres her.",
|
||||
"settings.providers.section.connected": "Forbundne udbydere",
|
||||
"settings.providers.connected.empty": "Ingen forbundne udbydere",
|
||||
"settings.providers.section.popular": "Populære udbydere",
|
||||
"settings.providers.tag.environment": "Miljø",
|
||||
"settings.providers.tag.config": "Konfiguration",
|
||||
"settings.providers.tag.custom": "Brugerdefineret",
|
||||
"settings.providers.tag.other": "Andet",
|
||||
"settings.models.title": "Modeller",
|
||||
"settings.models.description": "Modelindstillinger vil kunne konfigureres her.",
|
||||
"settings.agents.title": "Agenter",
|
||||
@@ -693,7 +583,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "Kunne ikke nulstille arbejdsområde",
|
||||
"workspace.reset.success.title": "Arbejdsområde nulstillet",
|
||||
"workspace.reset.success.description": "Arbejdsområdet matcher nu hovedgrenen.",
|
||||
"workspace.error.stillPreparing": "Arbejdsområdet er stadig ved at blive klargjort",
|
||||
"workspace.status.checking": "Tjekker for uflettede ændringer...",
|
||||
"workspace.status.error": "Kunne ikke bekræfte git-status.",
|
||||
"workspace.status.clean": "Ingen uflettede ændringer fundet.",
|
||||
|
||||
@@ -12,7 +12,6 @@ export const dict = {
|
||||
"command.category.theme": "Thema",
|
||||
"command.category.language": "Sprache",
|
||||
"command.category.file": "Datei",
|
||||
"command.category.context": "Kontext",
|
||||
"command.category.terminal": "Terminal",
|
||||
"command.category.model": "Modell",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -20,7 +19,6 @@ export const dict = {
|
||||
"command.category.permissions": "Berechtigungen",
|
||||
"command.category.workspace": "Arbeitsbereich",
|
||||
|
||||
"command.category.settings": "Einstellungen",
|
||||
"theme.scheme.system": "System",
|
||||
"theme.scheme.light": "Hell",
|
||||
"theme.scheme.dark": "Dunkel",
|
||||
@@ -29,7 +27,6 @@ export const dict = {
|
||||
"command.project.open": "Projekt öffnen",
|
||||
"command.provider.connect": "Anbieter verbinden",
|
||||
"command.server.switch": "Server wechseln",
|
||||
"command.settings.open": "Einstellungen öffnen",
|
||||
"command.session.previous": "Vorherige Sitzung",
|
||||
"command.session.next": "Nächste Sitzung",
|
||||
"command.session.archive": "Sitzung archivieren",
|
||||
@@ -47,10 +44,7 @@ export const dict = {
|
||||
"command.session.new": "Neue Sitzung",
|
||||
"command.file.open": "Datei öffnen",
|
||||
"command.file.open.description": "Dateien und Befehle durchsuchen",
|
||||
"command.context.addSelection": "Auswahl zum Kontext hinzufügen",
|
||||
"command.context.addSelection.description": "Ausgewählte Zeilen aus der aktuellen Datei hinzufügen",
|
||||
"command.terminal.toggle": "Terminal umschalten",
|
||||
"command.fileTree.toggle": "Dateibaum umschalten",
|
||||
"command.review.toggle": "Überprüfung umschalten",
|
||||
"command.terminal.new": "Neues Terminal",
|
||||
"command.terminal.new.description": "Neuen Terminal-Tab erstellen",
|
||||
@@ -127,7 +121,6 @@ export const dict = {
|
||||
"provider.connect.opencodeZen.line2":
|
||||
"Mit einem einzigen API-Schlüssel erhalten Sie Zugriff auf Modelle wie Claude, GPT, Gemini, GLM und mehr.",
|
||||
"provider.connect.opencodeZen.visit.prefix": "Besuchen Sie ",
|
||||
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
|
||||
"provider.connect.opencodeZen.visit.suffix": ", um Ihren API-Schlüssel zu erhalten.",
|
||||
"provider.connect.oauth.code.visit.prefix": "Besuchen Sie ",
|
||||
"provider.connect.oauth.code.visit.link": "diesen Link",
|
||||
@@ -145,32 +138,13 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "{{provider}} verbunden",
|
||||
"provider.connect.toast.connected.description": "{{provider}} Modelle sind jetzt verfügbar.",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "{{provider}} getrennt",
|
||||
"provider.disconnect.toast.disconnected.description": "Die {{provider}}-Modelle sind nicht mehr verfügbar.",
|
||||
"model.tag.free": "Kostenlos",
|
||||
"model.tag.latest": "Neueste",
|
||||
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
"model.provider.openai": "OpenAI",
|
||||
"model.provider.google": "Google",
|
||||
"model.provider.xai": "xAI",
|
||||
"model.provider.meta": "Meta",
|
||||
"model.input.text": "Text",
|
||||
"model.input.image": "Bild",
|
||||
"model.input.audio": "Audio",
|
||||
"model.input.video": "Video",
|
||||
"model.input.pdf": "pdf",
|
||||
"model.tooltip.allows": "Erlaubt: {{inputs}}",
|
||||
"model.tooltip.reasoning.allowed": "Erlaubt Reasoning",
|
||||
"model.tooltip.reasoning.none": "Kein Reasoning",
|
||||
"model.tooltip.context": "Kontextlimit {{limit}}",
|
||||
"common.search.placeholder": "Suchen",
|
||||
"common.goBack": "Zurück",
|
||||
"common.loading": "Laden",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "Abbrechen",
|
||||
"common.connect": "Verbinden",
|
||||
"common.disconnect": "Trennen",
|
||||
"common.submit": "Absenden",
|
||||
"common.save": "Speichern",
|
||||
"common.saving": "Speichert...",
|
||||
@@ -179,8 +153,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "Shell-Befehl eingeben...",
|
||||
"prompt.placeholder.normal": 'Fragen Sie alles... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "Kommentare zusammenfassen…",
|
||||
"prompt.placeholder.summarizeComment": "Kommentar zusammenfassen…",
|
||||
"prompt.mode.shell": "Shell",
|
||||
"prompt.mode.shell.exit": "esc zum Verlassen",
|
||||
|
||||
@@ -285,10 +257,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "Farbe",
|
||||
"dialog.project.edit.color.select": "{{color}}-Farbe auswählen",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "Startup-Skript für Arbeitsbereich",
|
||||
"dialog.project.edit.worktree.startup.description":
|
||||
"Wird nach dem Erstellen eines neuen Arbeitsbereichs (Worktree) ausgeführt.",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "z. B. bun install",
|
||||
"context.breakdown.title": "Kontext-Aufschlüsselung",
|
||||
"context.breakdown.note":
|
||||
'Ungefähre Aufschlüsselung der Eingabe-Token. "Andere" beinhaltet Werkzeugdefinitionen und Overhead.',
|
||||
@@ -355,9 +323,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "Datei konnte nicht geladen werden",
|
||||
|
||||
"toast.file.listFailed.title": "Dateien konnten nicht aufgelistet werden",
|
||||
"toast.context.noLineSelection.title": "Keine Zeilenauswahl",
|
||||
"toast.context.noLineSelection.description": "Wählen Sie zuerst einen Zeilenbereich in einem Datei-Tab aus.",
|
||||
"toast.session.share.copyFailed.title": "URL konnte nicht in die Zwischenablage kopiert werden",
|
||||
"toast.session.share.success.title": "Sitzung geteilt",
|
||||
"toast.session.share.success.description": "Teilen-URL in die Zwischenablage kopiert!",
|
||||
@@ -434,19 +399,13 @@ export const dict = {
|
||||
"session.tab.context": "Kontext",
|
||||
"session.panel.reviewAndFiles": "Überprüfung und Dateien",
|
||||
"session.review.filesChanged": "{{count}} Dateien geändert",
|
||||
"session.review.change.one": "Änderung",
|
||||
"session.review.change.other": "Änderungen",
|
||||
"session.review.loadingChanges": "Lade Änderungen...",
|
||||
"session.review.empty": "Noch keine Änderungen in dieser Sitzung",
|
||||
"session.review.noChanges": "Keine Änderungen",
|
||||
"session.files.selectToOpen": "Datei zum Öffnen auswählen",
|
||||
"session.files.all": "Alle Dateien",
|
||||
"session.messages.renderEarlier": "Frühere Nachrichten rendern",
|
||||
"session.messages.loadingEarlier": "Lade frühere Nachrichten...",
|
||||
"session.messages.loadEarlier": "Frühere Nachrichten laden",
|
||||
"session.messages.loading": "Lade Nachrichten...",
|
||||
|
||||
"session.messages.jumpToLatest": "Zum neuesten springen",
|
||||
"session.context.addToContext": "{{selection}} zum Kontext hinzufügen",
|
||||
|
||||
"session.new.worktree.main": "Haupt-Branch",
|
||||
@@ -488,9 +447,6 @@ export const dict = {
|
||||
"terminal.title.numbered": "Terminal {{number}}",
|
||||
"terminal.close": "Terminal schließen",
|
||||
|
||||
"terminal.connectionLost.title": "Verbindung verloren",
|
||||
"terminal.connectionLost.description":
|
||||
"Die Terminalverbindung wurde unterbrochen. Das kann passieren, wenn der Server neu startet.",
|
||||
"common.closeTab": "Tab schließen",
|
||||
"common.dismiss": "Verwerfen",
|
||||
"common.requestFailed": "Anfrage fehlgeschlagen",
|
||||
@@ -504,8 +460,6 @@ export const dict = {
|
||||
"common.edit": "Bearbeiten",
|
||||
"common.loadMore": "Mehr laden",
|
||||
|
||||
"common.key.esc": "ESC",
|
||||
"sidebar.menu.toggle": "Menü umschalten",
|
||||
"sidebar.nav.projectsAndSessions": "Projekte und Sitzungen",
|
||||
"sidebar.settings": "Einstellungen",
|
||||
"sidebar.help": "Hilfe",
|
||||
@@ -518,9 +472,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "Letzte Sitzungen",
|
||||
"sidebar.project.viewAllSessions": "Alle Sitzungen anzeigen",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "Desktop",
|
||||
"settings.section.server": "Server",
|
||||
"settings.tab.general": "Allgemein",
|
||||
"settings.tab.shortcuts": "Tastenkombinationen",
|
||||
|
||||
@@ -537,63 +489,6 @@ export const dict = {
|
||||
"settings.general.row.font.title": "Schriftart",
|
||||
"settings.general.row.font.description": "Die in Codeblöcken verwendete Monospace-Schriftart anpassen",
|
||||
|
||||
"font.option.ibmPlexMono": "IBM Plex Mono",
|
||||
"font.option.cascadiaCode": "Cascadia Code",
|
||||
"font.option.firaCode": "Fira Code",
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
"font.option.sourceCodePro": "Source Code Pro",
|
||||
"font.option.ubuntuMono": "Ubuntu Mono",
|
||||
"sound.option.alert01": "Alarm 01",
|
||||
"sound.option.alert02": "Alarm 02",
|
||||
"sound.option.alert03": "Alarm 03",
|
||||
"sound.option.alert04": "Alarm 04",
|
||||
"sound.option.alert05": "Alarm 05",
|
||||
"sound.option.alert06": "Alarm 06",
|
||||
"sound.option.alert07": "Alarm 07",
|
||||
"sound.option.alert08": "Alarm 08",
|
||||
"sound.option.alert09": "Alarm 09",
|
||||
"sound.option.alert10": "Alarm 10",
|
||||
"sound.option.bipbop01": "Bip-bop 01",
|
||||
"sound.option.bipbop02": "Bip-bop 02",
|
||||
"sound.option.bipbop03": "Bip-bop 03",
|
||||
"sound.option.bipbop04": "Bip-bop 04",
|
||||
"sound.option.bipbop05": "Bip-bop 05",
|
||||
"sound.option.bipbop06": "Bip-bop 06",
|
||||
"sound.option.bipbop07": "Bip-bop 07",
|
||||
"sound.option.bipbop08": "Bip-bop 08",
|
||||
"sound.option.bipbop09": "Bip-bop 09",
|
||||
"sound.option.bipbop10": "Bip-bop 10",
|
||||
"sound.option.staplebops01": "Staplebops 01",
|
||||
"sound.option.staplebops02": "Staplebops 02",
|
||||
"sound.option.staplebops03": "Staplebops 03",
|
||||
"sound.option.staplebops04": "Staplebops 04",
|
||||
"sound.option.staplebops05": "Staplebops 05",
|
||||
"sound.option.staplebops06": "Staplebops 06",
|
||||
"sound.option.staplebops07": "Staplebops 07",
|
||||
"sound.option.nope01": "Nein 01",
|
||||
"sound.option.nope02": "Nein 02",
|
||||
"sound.option.nope03": "Nein 03",
|
||||
"sound.option.nope04": "Nein 04",
|
||||
"sound.option.nope05": "Nein 05",
|
||||
"sound.option.nope06": "Nein 06",
|
||||
"sound.option.nope07": "Nein 07",
|
||||
"sound.option.nope08": "Nein 08",
|
||||
"sound.option.nope09": "Nein 09",
|
||||
"sound.option.nope10": "Nein 10",
|
||||
"sound.option.nope11": "Nein 11",
|
||||
"sound.option.nope12": "Nein 12",
|
||||
"sound.option.yup01": "Ja 01",
|
||||
"sound.option.yup02": "Ja 02",
|
||||
"sound.option.yup03": "Ja 03",
|
||||
"sound.option.yup04": "Ja 04",
|
||||
"sound.option.yup05": "Ja 05",
|
||||
"sound.option.yup06": "Ja 06",
|
||||
"settings.general.notifications.agent.title": "Agent",
|
||||
"settings.general.notifications.agent.description":
|
||||
"Systembenachrichtigung anzeigen, wenn der Agent fertig ist oder Aufmerksamkeit benötigt",
|
||||
@@ -630,13 +525,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "Anbieter",
|
||||
"settings.providers.description": "Anbietereinstellungen können hier konfiguriert werden.",
|
||||
"settings.providers.section.connected": "Verbundene Anbieter",
|
||||
"settings.providers.connected.empty": "Keine verbundenen Anbieter",
|
||||
"settings.providers.section.popular": "Beliebte Anbieter",
|
||||
"settings.providers.tag.environment": "Umgebung",
|
||||
"settings.providers.tag.config": "Konfiguration",
|
||||
"settings.providers.tag.custom": "Benutzerdefiniert",
|
||||
"settings.providers.tag.other": "Andere",
|
||||
"settings.models.title": "Modelle",
|
||||
"settings.models.description": "Modelleinstellungen können hier konfiguriert werden.",
|
||||
"settings.agents.title": "Agenten",
|
||||
@@ -704,7 +592,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "Arbeitsbereich konnte nicht zurückgesetzt werden",
|
||||
"workspace.reset.success.title": "Arbeitsbereich zurückgesetzt",
|
||||
"workspace.reset.success.description": "Der Arbeitsbereich entspricht jetzt dem Standard-Branch.",
|
||||
"workspace.error.stillPreparing": "Arbeitsbereich wird noch vorbereitet",
|
||||
"workspace.status.checking": "Suche nach nicht zusammengeführten Änderungen...",
|
||||
"workspace.status.error": "Git-Status konnte nicht überprüft werden.",
|
||||
"workspace.status.clean": "Keine nicht zusammengeführten Änderungen erkannt.",
|
||||
|
||||
@@ -8,7 +8,6 @@ export const dict = {
|
||||
"command.category.theme": "Theme",
|
||||
"command.category.language": "Language",
|
||||
"command.category.file": "File",
|
||||
"command.category.context": "Context",
|
||||
"command.category.terminal": "Terminal",
|
||||
"command.category.model": "Model",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -43,10 +42,7 @@ export const dict = {
|
||||
"command.session.new": "New session",
|
||||
"command.file.open": "Open file",
|
||||
"command.file.open.description": "Search files and commands",
|
||||
"command.context.addSelection": "Add selection to context",
|
||||
"command.context.addSelection.description": "Add selected lines from the current file",
|
||||
"command.terminal.toggle": "Toggle terminal",
|
||||
"command.fileTree.toggle": "Toggle file tree",
|
||||
"command.review.toggle": "Toggle review",
|
||||
"command.terminal.new": "New terminal",
|
||||
"command.terminal.new.description": "Create a new terminal tab",
|
||||
@@ -91,13 +87,9 @@ export const dict = {
|
||||
"dialog.provider.group.popular": "Popular",
|
||||
"dialog.provider.group.other": "Other",
|
||||
"dialog.provider.tag.recommended": "Recommended",
|
||||
"dialog.provider.opencode.note": "Curated models including Claude, GPT, Gemini and more",
|
||||
"dialog.provider.anthropic.note": "Direct access to Claude models, including Pro and Max",
|
||||
"dialog.provider.copilot.note": "Claude models for coding assistance",
|
||||
"dialog.provider.openai.note": "GPT models for fast, capable general AI tasks",
|
||||
"dialog.provider.google.note": "Gemini models for fast, structured responses",
|
||||
"dialog.provider.openrouter.note": "Access all supported models from one provider",
|
||||
"dialog.provider.vercel.note": "Unified access to AI models with smart routing",
|
||||
"dialog.provider.anthropic.note": "Connect with Claude Pro/Max or API key",
|
||||
"dialog.provider.openai.note": "Connect with ChatGPT Pro/Plus or API key",
|
||||
"dialog.provider.copilot.note": "Connect with Copilot or API key",
|
||||
|
||||
"dialog.model.select.title": "Select model",
|
||||
"dialog.model.search.placeholder": "Search models",
|
||||
@@ -180,8 +172,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "Enter shell command...",
|
||||
"prompt.placeholder.normal": 'Ask anything... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "Summarize comments…",
|
||||
"prompt.placeholder.summarizeComment": "Summarize comment…",
|
||||
"prompt.mode.shell": "Shell",
|
||||
"prompt.mode.shell.exit": "esc to exit",
|
||||
|
||||
@@ -352,10 +342,6 @@ export const dict = {
|
||||
"toast.model.none.description": "Connect a provider to summarize this session",
|
||||
|
||||
"toast.file.loadFailed.title": "Failed to load file",
|
||||
"toast.file.listFailed.title": "Failed to list files",
|
||||
|
||||
"toast.context.noLineSelection.title": "No line selection",
|
||||
"toast.context.noLineSelection.description": "Select a line range in a file tab first.",
|
||||
|
||||
"toast.session.share.copyFailed.title": "Failed to copy URL to clipboard",
|
||||
"toast.session.share.success.title": "Session shared",
|
||||
@@ -431,15 +417,8 @@ export const dict = {
|
||||
"session.tab.context": "Context",
|
||||
"session.panel.reviewAndFiles": "Review and files",
|
||||
"session.review.filesChanged": "{{count}} Files Changed",
|
||||
"session.review.change.one": "Change",
|
||||
"session.review.change.other": "Changes",
|
||||
"session.review.loadingChanges": "Loading changes...",
|
||||
"session.review.empty": "No changes in this session yet",
|
||||
"session.review.noChanges": "No changes",
|
||||
|
||||
"session.files.selectToOpen": "Select a file to open",
|
||||
"session.files.all": "All files",
|
||||
|
||||
"session.messages.renderEarlier": "Render earlier messages",
|
||||
"session.messages.loadingEarlier": "Loading earlier messages...",
|
||||
"session.messages.loadEarlier": "Load earlier messages",
|
||||
@@ -516,8 +495,6 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "Recent sessions",
|
||||
"sidebar.project.viewAllSessions": "View all sessions",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
|
||||
"settings.section.desktop": "Desktop",
|
||||
"settings.section.server": "Server",
|
||||
"settings.tab.general": "General",
|
||||
@@ -525,7 +502,6 @@ export const dict = {
|
||||
|
||||
"settings.general.section.appearance": "Appearance",
|
||||
"settings.general.section.notifications": "System notifications",
|
||||
"settings.general.section.updates": "Updates",
|
||||
"settings.general.section.sounds": "Sound effects",
|
||||
|
||||
"settings.general.row.language.title": "Language",
|
||||
@@ -536,9 +512,6 @@ export const dict = {
|
||||
"settings.general.row.theme.description": "Customise how OpenCode is themed.",
|
||||
"settings.general.row.font.title": "Font",
|
||||
"settings.general.row.font.description": "Customise the mono font used in code blocks",
|
||||
|
||||
"settings.general.row.releaseNotes.title": "Release notes",
|
||||
"settings.general.row.releaseNotes.description": "Show What's New popups after updates",
|
||||
"font.option.ibmPlexMono": "IBM Plex Mono",
|
||||
"font.option.cascadiaCode": "Cascadia Code",
|
||||
"font.option.firaCode": "Fira Code",
|
||||
@@ -705,7 +678,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "Failed to reset workspace",
|
||||
"workspace.reset.success.title": "Workspace reset",
|
||||
"workspace.reset.success.description": "Workspace now matches the default branch.",
|
||||
"workspace.error.stillPreparing": "Workspace is still preparing",
|
||||
"workspace.status.checking": "Checking for unmerged changes...",
|
||||
"workspace.status.error": "Unable to verify git status.",
|
||||
"workspace.status.clean": "No unmerged changes detected.",
|
||||
|
||||
@@ -8,7 +8,6 @@ export const dict = {
|
||||
"command.category.theme": "Tema",
|
||||
"command.category.language": "Idioma",
|
||||
"command.category.file": "Archivo",
|
||||
"command.category.context": "Contexto",
|
||||
"command.category.terminal": "Terminal",
|
||||
"command.category.model": "Modelo",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -16,7 +15,6 @@ export const dict = {
|
||||
"command.category.permissions": "Permisos",
|
||||
"command.category.workspace": "Espacio de trabajo",
|
||||
|
||||
"command.category.settings": "Ajustes",
|
||||
"theme.scheme.system": "Sistema",
|
||||
"theme.scheme.light": "Claro",
|
||||
"theme.scheme.dark": "Oscuro",
|
||||
@@ -25,7 +23,6 @@ export const dict = {
|
||||
"command.project.open": "Abrir proyecto",
|
||||
"command.provider.connect": "Conectar proveedor",
|
||||
"command.server.switch": "Cambiar servidor",
|
||||
"command.settings.open": "Abrir ajustes",
|
||||
"command.session.previous": "Sesión anterior",
|
||||
"command.session.next": "Siguiente sesión",
|
||||
"command.session.archive": "Archivar sesión",
|
||||
@@ -43,10 +40,7 @@ export const dict = {
|
||||
"command.session.new": "Nueva sesión",
|
||||
"command.file.open": "Abrir archivo",
|
||||
"command.file.open.description": "Buscar archivos y comandos",
|
||||
"command.context.addSelection": "Añadir selección al contexto",
|
||||
"command.context.addSelection.description": "Añadir las líneas seleccionadas del archivo actual",
|
||||
"command.terminal.toggle": "Alternar terminal",
|
||||
"command.fileTree.toggle": "Alternar árbol de archivos",
|
||||
"command.review.toggle": "Alternar revisión",
|
||||
"command.terminal.new": "Nueva terminal",
|
||||
"command.terminal.new.description": "Crear una nueva pestaña de terminal",
|
||||
@@ -123,7 +117,6 @@ export const dict = {
|
||||
"provider.connect.opencodeZen.line2":
|
||||
"Con una sola clave API obtendrás acceso a modelos como Claude, GPT, Gemini, GLM y más.",
|
||||
"provider.connect.opencodeZen.visit.prefix": "Visita ",
|
||||
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
|
||||
"provider.connect.opencodeZen.visit.suffix": " para obtener tu clave API.",
|
||||
"provider.connect.oauth.code.visit.prefix": "Visita ",
|
||||
"provider.connect.oauth.code.visit.link": "este enlace",
|
||||
@@ -141,32 +134,13 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "{{provider}} conectado",
|
||||
"provider.connect.toast.connected.description": "Los modelos de {{provider}} ahora están disponibles para usar.",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "{{provider}} desconectado",
|
||||
"provider.disconnect.toast.disconnected.description": "Los modelos de {{provider}} ya no están disponibles.",
|
||||
"model.tag.free": "Gratis",
|
||||
"model.tag.latest": "Último",
|
||||
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
"model.provider.openai": "OpenAI",
|
||||
"model.provider.google": "Google",
|
||||
"model.provider.xai": "xAI",
|
||||
"model.provider.meta": "Meta",
|
||||
"model.input.text": "texto",
|
||||
"model.input.image": "imagen",
|
||||
"model.input.audio": "audio",
|
||||
"model.input.video": "video",
|
||||
"model.input.pdf": "pdf",
|
||||
"model.tooltip.allows": "Permite: {{inputs}}",
|
||||
"model.tooltip.reasoning.allowed": "Permite razonamiento",
|
||||
"model.tooltip.reasoning.none": "Sin razonamiento",
|
||||
"model.tooltip.context": "Límite de contexto {{limit}}",
|
||||
"common.search.placeholder": "Buscar",
|
||||
"common.goBack": "Volver",
|
||||
"common.loading": "Cargando",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "Cancelar",
|
||||
"common.connect": "Conectar",
|
||||
"common.disconnect": "Desconectar",
|
||||
"common.submit": "Enviar",
|
||||
"common.save": "Guardar",
|
||||
"common.saving": "Guardando...",
|
||||
@@ -175,8 +149,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "Introduce comando de shell...",
|
||||
"prompt.placeholder.normal": 'Pregunta cualquier cosa... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "Resumir comentarios…",
|
||||
"prompt.placeholder.summarizeComment": "Resumir comentario…",
|
||||
"prompt.mode.shell": "Shell",
|
||||
"prompt.mode.shell.exit": "esc para salir",
|
||||
|
||||
@@ -280,10 +252,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "Color",
|
||||
"dialog.project.edit.color.select": "Seleccionar color {{color}}",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "Script de inicio del espacio de trabajo",
|
||||
"dialog.project.edit.worktree.startup.description":
|
||||
"Se ejecuta después de crear un nuevo espacio de trabajo (árbol de trabajo).",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "p. ej. bun install",
|
||||
"context.breakdown.title": "Desglose de Contexto",
|
||||
"context.breakdown.note":
|
||||
'Desglose aproximado de tokens de entrada. "Otro" incluye definiciones de herramientas y sobrecarga.',
|
||||
@@ -350,9 +318,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "Fallo al cargar archivo",
|
||||
|
||||
"toast.file.listFailed.title": "Fallo al listar archivos",
|
||||
"toast.context.noLineSelection.title": "Sin selección de líneas",
|
||||
"toast.context.noLineSelection.description": "Primero selecciona un rango de líneas en una pestaña de archivo.",
|
||||
"toast.session.share.copyFailed.title": "Fallo al copiar URL al portapapeles",
|
||||
"toast.session.share.success.title": "Sesión compartida",
|
||||
"toast.session.share.success.description": "¡URL compartida copiada al portapapeles!",
|
||||
@@ -428,19 +393,13 @@ export const dict = {
|
||||
"session.tab.context": "Contexto",
|
||||
"session.panel.reviewAndFiles": "Revisión y archivos",
|
||||
"session.review.filesChanged": "{{count}} Archivos Cambiados",
|
||||
"session.review.change.one": "Cambio",
|
||||
"session.review.change.other": "Cambios",
|
||||
"session.review.loadingChanges": "Cargando cambios...",
|
||||
"session.review.empty": "No hay cambios en esta sesión aún",
|
||||
"session.review.noChanges": "Sin cambios",
|
||||
"session.files.selectToOpen": "Selecciona un archivo para abrir",
|
||||
"session.files.all": "Todos los archivos",
|
||||
"session.messages.renderEarlier": "Renderizar mensajes anteriores",
|
||||
"session.messages.loadingEarlier": "Cargando mensajes anteriores...",
|
||||
"session.messages.loadEarlier": "Cargar mensajes anteriores",
|
||||
"session.messages.loading": "Cargando mensajes...",
|
||||
|
||||
"session.messages.jumpToLatest": "Ir al último",
|
||||
"session.context.addToContext": "Añadir {{selection}} al contexto",
|
||||
|
||||
"session.new.worktree.main": "Rama principal",
|
||||
@@ -482,9 +441,6 @@ export const dict = {
|
||||
"terminal.title.numbered": "Terminal {{number}}",
|
||||
"terminal.close": "Cerrar terminal",
|
||||
|
||||
"terminal.connectionLost.title": "Conexión perdida",
|
||||
"terminal.connectionLost.description":
|
||||
"La conexión del terminal se interrumpió. Esto puede ocurrir cuando el servidor se reinicia.",
|
||||
"common.closeTab": "Cerrar pestaña",
|
||||
"common.dismiss": "Descartar",
|
||||
"common.requestFailed": "Solicitud fallida",
|
||||
@@ -498,8 +454,6 @@ export const dict = {
|
||||
"common.edit": "Editar",
|
||||
"common.loadMore": "Cargar más",
|
||||
|
||||
"common.key.esc": "ESC",
|
||||
"sidebar.menu.toggle": "Alternar menú",
|
||||
"sidebar.nav.projectsAndSessions": "Proyectos y sesiones",
|
||||
"sidebar.settings": "Ajustes",
|
||||
"sidebar.help": "Ayuda",
|
||||
@@ -511,9 +465,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "Sesiones recientes",
|
||||
"sidebar.project.viewAllSessions": "Ver todas las sesiones",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "Escritorio",
|
||||
"settings.section.server": "Servidor",
|
||||
"settings.tab.general": "General",
|
||||
"settings.tab.shortcuts": "Atajos",
|
||||
|
||||
@@ -530,63 +482,6 @@ export const dict = {
|
||||
"settings.general.row.font.title": "Fuente",
|
||||
"settings.general.row.font.description": "Personaliza la fuente mono usada en bloques de código",
|
||||
|
||||
"font.option.ibmPlexMono": "IBM Plex Mono",
|
||||
"font.option.cascadiaCode": "Cascadia Code",
|
||||
"font.option.firaCode": "Fira Code",
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
"font.option.sourceCodePro": "Source Code Pro",
|
||||
"font.option.ubuntuMono": "Ubuntu Mono",
|
||||
"sound.option.alert01": "Alerta 01",
|
||||
"sound.option.alert02": "Alerta 02",
|
||||
"sound.option.alert03": "Alerta 03",
|
||||
"sound.option.alert04": "Alerta 04",
|
||||
"sound.option.alert05": "Alerta 05",
|
||||
"sound.option.alert06": "Alerta 06",
|
||||
"sound.option.alert07": "Alerta 07",
|
||||
"sound.option.alert08": "Alerta 08",
|
||||
"sound.option.alert09": "Alerta 09",
|
||||
"sound.option.alert10": "Alerta 10",
|
||||
"sound.option.bipbop01": "Bip-bop 01",
|
||||
"sound.option.bipbop02": "Bip-bop 02",
|
||||
"sound.option.bipbop03": "Bip-bop 03",
|
||||
"sound.option.bipbop04": "Bip-bop 04",
|
||||
"sound.option.bipbop05": "Bip-bop 05",
|
||||
"sound.option.bipbop06": "Bip-bop 06",
|
||||
"sound.option.bipbop07": "Bip-bop 07",
|
||||
"sound.option.bipbop08": "Bip-bop 08",
|
||||
"sound.option.bipbop09": "Bip-bop 09",
|
||||
"sound.option.bipbop10": "Bip-bop 10",
|
||||
"sound.option.staplebops01": "Staplebops 01",
|
||||
"sound.option.staplebops02": "Staplebops 02",
|
||||
"sound.option.staplebops03": "Staplebops 03",
|
||||
"sound.option.staplebops04": "Staplebops 04",
|
||||
"sound.option.staplebops05": "Staplebops 05",
|
||||
"sound.option.staplebops06": "Staplebops 06",
|
||||
"sound.option.staplebops07": "Staplebops 07",
|
||||
"sound.option.nope01": "No 01",
|
||||
"sound.option.nope02": "No 02",
|
||||
"sound.option.nope03": "No 03",
|
||||
"sound.option.nope04": "No 04",
|
||||
"sound.option.nope05": "No 05",
|
||||
"sound.option.nope06": "No 06",
|
||||
"sound.option.nope07": "No 07",
|
||||
"sound.option.nope08": "No 08",
|
||||
"sound.option.nope09": "No 09",
|
||||
"sound.option.nope10": "No 10",
|
||||
"sound.option.nope11": "No 11",
|
||||
"sound.option.nope12": "No 12",
|
||||
"sound.option.yup01": "Sí 01",
|
||||
"sound.option.yup02": "Sí 02",
|
||||
"sound.option.yup03": "Sí 03",
|
||||
"sound.option.yup04": "Sí 04",
|
||||
"sound.option.yup05": "Sí 05",
|
||||
"sound.option.yup06": "Sí 06",
|
||||
"settings.general.notifications.agent.title": "Agente",
|
||||
"settings.general.notifications.agent.description":
|
||||
"Mostrar notificación del sistema cuando el agente termine o necesite atención",
|
||||
@@ -624,13 +519,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "Proveedores",
|
||||
"settings.providers.description": "La configuración de proveedores estará disponible aquí.",
|
||||
"settings.providers.section.connected": "Proveedores conectados",
|
||||
"settings.providers.connected.empty": "No hay proveedores conectados",
|
||||
"settings.providers.section.popular": "Proveedores populares",
|
||||
"settings.providers.tag.environment": "Entorno",
|
||||
"settings.providers.tag.config": "Configuración",
|
||||
"settings.providers.tag.custom": "Personalizado",
|
||||
"settings.providers.tag.other": "Otro",
|
||||
"settings.models.title": "Modelos",
|
||||
"settings.models.description": "La configuración de modelos estará disponible aquí.",
|
||||
"settings.agents.title": "Agentes",
|
||||
@@ -698,7 +586,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "Fallo al restablecer espacio de trabajo",
|
||||
"workspace.reset.success.title": "Espacio de trabajo restablecido",
|
||||
"workspace.reset.success.description": "El espacio de trabajo ahora coincide con la rama predeterminada.",
|
||||
"workspace.error.stillPreparing": "El espacio de trabajo aún se está preparando",
|
||||
"workspace.status.checking": "Comprobando cambios no fusionados...",
|
||||
"workspace.status.error": "No se pudo verificar el estado de git.",
|
||||
"workspace.status.clean": "No se detectaron cambios no fusionados.",
|
||||
|
||||
@@ -8,7 +8,6 @@ export const dict = {
|
||||
"command.category.theme": "Thème",
|
||||
"command.category.language": "Langue",
|
||||
"command.category.file": "Fichier",
|
||||
"command.category.context": "Contexte",
|
||||
"command.category.terminal": "Terminal",
|
||||
"command.category.model": "Modèle",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -16,7 +15,6 @@ export const dict = {
|
||||
"command.category.permissions": "Permissions",
|
||||
"command.category.workspace": "Espace de travail",
|
||||
|
||||
"command.category.settings": "Paramètres",
|
||||
"theme.scheme.system": "Système",
|
||||
"theme.scheme.light": "Clair",
|
||||
"theme.scheme.dark": "Sombre",
|
||||
@@ -25,7 +23,6 @@ export const dict = {
|
||||
"command.project.open": "Ouvrir un projet",
|
||||
"command.provider.connect": "Connecter un fournisseur",
|
||||
"command.server.switch": "Changer de serveur",
|
||||
"command.settings.open": "Ouvrir les paramètres",
|
||||
"command.session.previous": "Session précédente",
|
||||
"command.session.next": "Session suivante",
|
||||
"command.session.archive": "Archiver la session",
|
||||
@@ -43,10 +40,7 @@ export const dict = {
|
||||
"command.session.new": "Nouvelle session",
|
||||
"command.file.open": "Ouvrir un fichier",
|
||||
"command.file.open.description": "Rechercher des fichiers et des commandes",
|
||||
"command.context.addSelection": "Ajouter la sélection au contexte",
|
||||
"command.context.addSelection.description": "Ajouter les lignes sélectionnées du fichier actuel",
|
||||
"command.terminal.toggle": "Basculer le terminal",
|
||||
"command.fileTree.toggle": "Basculer l'arborescence des fichiers",
|
||||
"command.review.toggle": "Basculer la revue",
|
||||
"command.terminal.new": "Nouveau terminal",
|
||||
"command.terminal.new.description": "Créer un nouvel onglet de terminal",
|
||||
@@ -123,7 +117,6 @@ export const dict = {
|
||||
"provider.connect.opencodeZen.line2":
|
||||
"Avec une seule clé API, vous aurez accès à des modèles tels que Claude, GPT, Gemini, GLM et plus encore.",
|
||||
"provider.connect.opencodeZen.visit.prefix": "Visitez ",
|
||||
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
|
||||
"provider.connect.opencodeZen.visit.suffix": " pour récupérer votre clé API.",
|
||||
"provider.connect.oauth.code.visit.prefix": "Visitez ",
|
||||
"provider.connect.oauth.code.visit.link": "ce lien",
|
||||
@@ -141,32 +134,13 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "{{provider}} connecté",
|
||||
"provider.connect.toast.connected.description": "Les modèles {{provider}} sont maintenant disponibles.",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "{{provider}} déconnecté",
|
||||
"provider.disconnect.toast.disconnected.description": "Les modèles {{provider}} ne sont plus disponibles.",
|
||||
"model.tag.free": "Gratuit",
|
||||
"model.tag.latest": "Dernier",
|
||||
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
"model.provider.openai": "OpenAI",
|
||||
"model.provider.google": "Google",
|
||||
"model.provider.xai": "xAI",
|
||||
"model.provider.meta": "Meta",
|
||||
"model.input.text": "texte",
|
||||
"model.input.image": "image",
|
||||
"model.input.audio": "audio",
|
||||
"model.input.video": "vidéo",
|
||||
"model.input.pdf": "pdf",
|
||||
"model.tooltip.allows": "Autorise : {{inputs}}",
|
||||
"model.tooltip.reasoning.allowed": "Autorise le raisonnement",
|
||||
"model.tooltip.reasoning.none": "Sans raisonnement",
|
||||
"model.tooltip.context": "Limite de contexte {{limit}}",
|
||||
"common.search.placeholder": "Rechercher",
|
||||
"common.goBack": "Retour",
|
||||
"common.loading": "Chargement",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "Annuler",
|
||||
"common.connect": "Connecter",
|
||||
"common.disconnect": "Déconnecter",
|
||||
"common.submit": "Soumettre",
|
||||
"common.save": "Enregistrer",
|
||||
"common.saving": "Enregistrement...",
|
||||
@@ -175,8 +149,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "Entrez une commande shell...",
|
||||
"prompt.placeholder.normal": 'Demandez n\'importe quoi... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "Résumer les commentaires…",
|
||||
"prompt.placeholder.summarizeComment": "Résumer le commentaire…",
|
||||
"prompt.mode.shell": "Shell",
|
||||
"prompt.mode.shell.exit": "esc pour quitter",
|
||||
|
||||
@@ -280,10 +252,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "Couleur",
|
||||
"dialog.project.edit.color.select": "Sélectionner la couleur {{color}}",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "Script de démarrage de l'espace de travail",
|
||||
"dialog.project.edit.worktree.startup.description":
|
||||
"S'exécute après la création d'un nouvel espace de travail (arbre de travail).",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "p. ex. bun install",
|
||||
"context.breakdown.title": "Répartition du contexte",
|
||||
"context.breakdown.note":
|
||||
"Répartition approximative des jetons d'entrée. \"Autre\" inclut les définitions d'outils et les frais généraux.",
|
||||
@@ -352,9 +320,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "Échec du chargement du fichier",
|
||||
|
||||
"toast.file.listFailed.title": "Échec de la liste des fichiers",
|
||||
"toast.context.noLineSelection.title": "Aucune sélection de lignes",
|
||||
"toast.context.noLineSelection.description": "Sélectionnez d'abord une plage de lignes dans un onglet de fichier.",
|
||||
"toast.session.share.copyFailed.title": "Échec de la copie de l'URL dans le presse-papiers",
|
||||
"toast.session.share.success.title": "Session partagée",
|
||||
"toast.session.share.success.description": "URL de partage copiée dans le presse-papiers !",
|
||||
@@ -433,19 +398,13 @@ export const dict = {
|
||||
"session.tab.context": "Contexte",
|
||||
"session.panel.reviewAndFiles": "Revue et fichiers",
|
||||
"session.review.filesChanged": "{{count}} fichiers modifiés",
|
||||
"session.review.change.one": "Modification",
|
||||
"session.review.change.other": "Modifications",
|
||||
"session.review.loadingChanges": "Chargement des modifications...",
|
||||
"session.review.empty": "Aucune modification dans cette session pour l'instant",
|
||||
"session.review.noChanges": "Aucune modification",
|
||||
"session.files.selectToOpen": "Sélectionnez un fichier à ouvrir",
|
||||
"session.files.all": "Tous les fichiers",
|
||||
"session.messages.renderEarlier": "Afficher les messages précédents",
|
||||
"session.messages.loadingEarlier": "Chargement des messages précédents...",
|
||||
"session.messages.loadEarlier": "Charger les messages précédents",
|
||||
"session.messages.loading": "Chargement des messages...",
|
||||
|
||||
"session.messages.jumpToLatest": "Aller au dernier",
|
||||
"session.context.addToContext": "Ajouter {{selection}} au contexte",
|
||||
|
||||
"session.new.worktree.main": "Branche principale",
|
||||
@@ -487,9 +446,6 @@ export const dict = {
|
||||
"terminal.title.numbered": "Terminal {{number}}",
|
||||
"terminal.close": "Fermer le terminal",
|
||||
|
||||
"terminal.connectionLost.title": "Connexion perdue",
|
||||
"terminal.connectionLost.description":
|
||||
"La connexion au terminal a été interrompue. Cela peut arriver lorsque le serveur redémarre.",
|
||||
"common.closeTab": "Fermer l'onglet",
|
||||
"common.dismiss": "Ignorer",
|
||||
"common.requestFailed": "La demande a échoué",
|
||||
@@ -503,8 +459,6 @@ export const dict = {
|
||||
"common.edit": "Modifier",
|
||||
"common.loadMore": "Charger plus",
|
||||
|
||||
"common.key.esc": "ESC",
|
||||
"sidebar.menu.toggle": "Basculer le menu",
|
||||
"sidebar.nav.projectsAndSessions": "Projets et sessions",
|
||||
"sidebar.settings": "Paramètres",
|
||||
"sidebar.help": "Aide",
|
||||
@@ -518,9 +472,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "Sessions récentes",
|
||||
"sidebar.project.viewAllSessions": "Voir toutes les sessions",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "Bureau",
|
||||
"settings.section.server": "Serveur",
|
||||
"settings.tab.general": "Général",
|
||||
"settings.tab.shortcuts": "Raccourcis",
|
||||
|
||||
@@ -537,63 +489,6 @@ export const dict = {
|
||||
"settings.general.row.font.title": "Police",
|
||||
"settings.general.row.font.description": "Personnaliser la police mono utilisée dans les blocs de code",
|
||||
|
||||
"font.option.ibmPlexMono": "IBM Plex Mono",
|
||||
"font.option.cascadiaCode": "Cascadia Code",
|
||||
"font.option.firaCode": "Fira Code",
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
"font.option.sourceCodePro": "Source Code Pro",
|
||||
"font.option.ubuntuMono": "Ubuntu Mono",
|
||||
"sound.option.alert01": "Alerte 01",
|
||||
"sound.option.alert02": "Alerte 02",
|
||||
"sound.option.alert03": "Alerte 03",
|
||||
"sound.option.alert04": "Alerte 04",
|
||||
"sound.option.alert05": "Alerte 05",
|
||||
"sound.option.alert06": "Alerte 06",
|
||||
"sound.option.alert07": "Alerte 07",
|
||||
"sound.option.alert08": "Alerte 08",
|
||||
"sound.option.alert09": "Alerte 09",
|
||||
"sound.option.alert10": "Alerte 10",
|
||||
"sound.option.bipbop01": "Bip-bop 01",
|
||||
"sound.option.bipbop02": "Bip-bop 02",
|
||||
"sound.option.bipbop03": "Bip-bop 03",
|
||||
"sound.option.bipbop04": "Bip-bop 04",
|
||||
"sound.option.bipbop05": "Bip-bop 05",
|
||||
"sound.option.bipbop06": "Bip-bop 06",
|
||||
"sound.option.bipbop07": "Bip-bop 07",
|
||||
"sound.option.bipbop08": "Bip-bop 08",
|
||||
"sound.option.bipbop09": "Bip-bop 09",
|
||||
"sound.option.bipbop10": "Bip-bop 10",
|
||||
"sound.option.staplebops01": "Staplebops 01",
|
||||
"sound.option.staplebops02": "Staplebops 02",
|
||||
"sound.option.staplebops03": "Staplebops 03",
|
||||
"sound.option.staplebops04": "Staplebops 04",
|
||||
"sound.option.staplebops05": "Staplebops 05",
|
||||
"sound.option.staplebops06": "Staplebops 06",
|
||||
"sound.option.staplebops07": "Staplebops 07",
|
||||
"sound.option.nope01": "Non 01",
|
||||
"sound.option.nope02": "Non 02",
|
||||
"sound.option.nope03": "Non 03",
|
||||
"sound.option.nope04": "Non 04",
|
||||
"sound.option.nope05": "Non 05",
|
||||
"sound.option.nope06": "Non 06",
|
||||
"sound.option.nope07": "Non 07",
|
||||
"sound.option.nope08": "Non 08",
|
||||
"sound.option.nope09": "Non 09",
|
||||
"sound.option.nope10": "Non 10",
|
||||
"sound.option.nope11": "Non 11",
|
||||
"sound.option.nope12": "Non 12",
|
||||
"sound.option.yup01": "Oui 01",
|
||||
"sound.option.yup02": "Oui 02",
|
||||
"sound.option.yup03": "Oui 03",
|
||||
"sound.option.yup04": "Oui 04",
|
||||
"sound.option.yup05": "Oui 05",
|
||||
"sound.option.yup06": "Oui 06",
|
||||
"settings.general.notifications.agent.title": "Agent",
|
||||
"settings.general.notifications.agent.description":
|
||||
"Afficher une notification système lorsque l'agent a terminé ou nécessite une attention",
|
||||
@@ -630,13 +525,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "Fournisseurs",
|
||||
"settings.providers.description": "Les paramètres des fournisseurs seront configurables ici.",
|
||||
"settings.providers.section.connected": "Fournisseurs connectés",
|
||||
"settings.providers.connected.empty": "Aucun fournisseur connecté",
|
||||
"settings.providers.section.popular": "Fournisseurs populaires",
|
||||
"settings.providers.tag.environment": "Environnement",
|
||||
"settings.providers.tag.config": "Configuration",
|
||||
"settings.providers.tag.custom": "Personnalisé",
|
||||
"settings.providers.tag.other": "Autre",
|
||||
"settings.models.title": "Modèles",
|
||||
"settings.models.description": "Les paramètres des modèles seront configurables ici.",
|
||||
"settings.agents.title": "Agents",
|
||||
@@ -705,7 +593,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "Échec de la réinitialisation de l'espace de travail",
|
||||
"workspace.reset.success.title": "Espace de travail réinitialisé",
|
||||
"workspace.reset.success.description": "L'espace de travail correspond maintenant à la branche par défaut.",
|
||||
"workspace.error.stillPreparing": "L'espace de travail est encore en cours de préparation",
|
||||
"workspace.status.checking": "Vérification des modifications non fusionnées...",
|
||||
"workspace.status.error": "Impossible de vérifier le statut git.",
|
||||
"workspace.status.clean": "Aucune modification non fusionnée détectée.",
|
||||
|
||||
@@ -8,7 +8,6 @@ export const dict = {
|
||||
"command.category.theme": "テーマ",
|
||||
"command.category.language": "言語",
|
||||
"command.category.file": "ファイル",
|
||||
"command.category.context": "コンテキスト",
|
||||
"command.category.terminal": "ターミナル",
|
||||
"command.category.model": "モデル",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -16,7 +15,6 @@ export const dict = {
|
||||
"command.category.permissions": "権限",
|
||||
"command.category.workspace": "ワークスペース",
|
||||
|
||||
"command.category.settings": "設定",
|
||||
"theme.scheme.system": "システム",
|
||||
"theme.scheme.light": "ライト",
|
||||
"theme.scheme.dark": "ダーク",
|
||||
@@ -25,7 +23,6 @@ export const dict = {
|
||||
"command.project.open": "プロジェクトを開く",
|
||||
"command.provider.connect": "プロバイダーに接続",
|
||||
"command.server.switch": "サーバーの切り替え",
|
||||
"command.settings.open": "設定を開く",
|
||||
"command.session.previous": "前のセッション",
|
||||
"command.session.next": "次のセッション",
|
||||
"command.session.archive": "セッションをアーカイブ",
|
||||
@@ -43,10 +40,7 @@ export const dict = {
|
||||
"command.session.new": "新しいセッション",
|
||||
"command.file.open": "ファイルを開く",
|
||||
"command.file.open.description": "ファイルとコマンドを検索",
|
||||
"command.context.addSelection": "選択範囲をコンテキストに追加",
|
||||
"command.context.addSelection.description": "現在のファイルから選択した行を追加",
|
||||
"command.terminal.toggle": "ターミナルの切り替え",
|
||||
"command.fileTree.toggle": "ファイルツリーを切り替え",
|
||||
"command.review.toggle": "レビューの切り替え",
|
||||
"command.terminal.new": "新しいターミナル",
|
||||
"command.terminal.new.description": "新しいターミナルタブを作成",
|
||||
@@ -122,7 +116,6 @@ export const dict = {
|
||||
"OpenCode Zenは、コーディングエージェント向けに最適化された信頼性の高いモデルへのアクセスを提供します。",
|
||||
"provider.connect.opencodeZen.line2": "1つのAPIキーで、Claude、GPT、Gemini、GLMなどのモデルにアクセスできます。",
|
||||
"provider.connect.opencodeZen.visit.prefix": " ",
|
||||
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
|
||||
"provider.connect.opencodeZen.visit.suffix": " にアクセスしてAPIキーを取得してください。",
|
||||
"provider.connect.oauth.code.visit.prefix": " ",
|
||||
"provider.connect.oauth.code.visit.link": "このリンク",
|
||||
@@ -140,32 +133,13 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "{{provider}}が接続されました",
|
||||
"provider.connect.toast.connected.description": "{{provider}}モデルが使用可能になりました。",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "{{provider}}が切断されました",
|
||||
"provider.disconnect.toast.disconnected.description": "{{provider}}のモデルは利用できなくなりました。",
|
||||
"model.tag.free": "無料",
|
||||
"model.tag.latest": "最新",
|
||||
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
"model.provider.openai": "OpenAI",
|
||||
"model.provider.google": "Google",
|
||||
"model.provider.xai": "xAI",
|
||||
"model.provider.meta": "Meta",
|
||||
"model.input.text": "テキスト",
|
||||
"model.input.image": "画像",
|
||||
"model.input.audio": "音声",
|
||||
"model.input.video": "動画",
|
||||
"model.input.pdf": "pdf",
|
||||
"model.tooltip.allows": "対応: {{inputs}}",
|
||||
"model.tooltip.reasoning.allowed": "推論を許可",
|
||||
"model.tooltip.reasoning.none": "推論なし",
|
||||
"model.tooltip.context": "コンテキスト上限 {{limit}}",
|
||||
"common.search.placeholder": "検索",
|
||||
"common.goBack": "戻る",
|
||||
"common.loading": "読み込み中",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "キャンセル",
|
||||
"common.connect": "接続",
|
||||
"common.disconnect": "切断",
|
||||
"common.submit": "送信",
|
||||
"common.save": "保存",
|
||||
"common.saving": "保存中...",
|
||||
@@ -174,8 +148,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "シェルコマンドを入力...",
|
||||
"prompt.placeholder.normal": '何でも聞いてください... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "コメントを要約…",
|
||||
"prompt.placeholder.summarizeComment": "コメントを要約…",
|
||||
"prompt.mode.shell": "Shell",
|
||||
"prompt.mode.shell.exit": "escで終了",
|
||||
|
||||
@@ -279,10 +251,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "色",
|
||||
"dialog.project.edit.color.select": "{{color}}の色を選択",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "ワークスペース起動スクリプト",
|
||||
"dialog.project.edit.worktree.startup.description":
|
||||
"新しいワークスペース (ワークツリー) を作成した後に実行されます。",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "例: bun install",
|
||||
"context.breakdown.title": "コンテキストの内訳",
|
||||
"context.breakdown.note": '入力トークンのおおよその内訳です。"その他"にはツールの定義やオーバーヘッドが含まれます。',
|
||||
"context.breakdown.system": "システム",
|
||||
@@ -348,9 +316,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "ファイルの読み込みに失敗しました",
|
||||
|
||||
"toast.file.listFailed.title": "ファイル一覧の取得に失敗しました",
|
||||
"toast.context.noLineSelection.title": "行が選択されていません",
|
||||
"toast.context.noLineSelection.description": "まずファイルタブで行範囲を選択してください。",
|
||||
"toast.session.share.copyFailed.title": "URLのコピーに失敗しました",
|
||||
"toast.session.share.success.title": "セッションを共有しました",
|
||||
"toast.session.share.success.description": "共有URLをクリップボードにコピーしました!",
|
||||
@@ -425,19 +390,13 @@ export const dict = {
|
||||
"session.tab.context": "コンテキスト",
|
||||
"session.panel.reviewAndFiles": "レビューとファイル",
|
||||
"session.review.filesChanged": "{{count}} ファイル変更",
|
||||
"session.review.change.one": "変更",
|
||||
"session.review.change.other": "変更",
|
||||
"session.review.loadingChanges": "変更を読み込み中...",
|
||||
"session.review.empty": "このセッションでの変更はまだありません",
|
||||
"session.review.noChanges": "変更なし",
|
||||
"session.files.selectToOpen": "開くファイルを選択",
|
||||
"session.files.all": "すべてのファイル",
|
||||
"session.messages.renderEarlier": "以前のメッセージを表示",
|
||||
"session.messages.loadingEarlier": "以前のメッセージを読み込み中...",
|
||||
"session.messages.loadEarlier": "以前のメッセージを読み込む",
|
||||
"session.messages.loading": "メッセージを読み込み中...",
|
||||
|
||||
"session.messages.jumpToLatest": "最新へジャンプ",
|
||||
"session.context.addToContext": "{{selection}}をコンテキストに追加",
|
||||
|
||||
"session.new.worktree.main": "メインブランチ",
|
||||
@@ -479,9 +438,6 @@ export const dict = {
|
||||
"terminal.title.numbered": "ターミナル {{number}}",
|
||||
"terminal.close": "ターミナルを閉じる",
|
||||
|
||||
"terminal.connectionLost.title": "接続が失われました",
|
||||
"terminal.connectionLost.description":
|
||||
"ターミナルの接続が中断されました。これはサーバーが再起動したときに発生することがあります。",
|
||||
"common.closeTab": "タブを閉じる",
|
||||
"common.dismiss": "閉じる",
|
||||
"common.requestFailed": "リクエスト失敗",
|
||||
@@ -495,8 +451,6 @@ export const dict = {
|
||||
"common.edit": "編集",
|
||||
"common.loadMore": "さらに読み込む",
|
||||
|
||||
"common.key.esc": "ESC",
|
||||
"sidebar.menu.toggle": "メニューを切り替え",
|
||||
"sidebar.nav.projectsAndSessions": "プロジェクトとセッション",
|
||||
"sidebar.settings": "設定",
|
||||
"sidebar.help": "ヘルプ",
|
||||
@@ -508,9 +462,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "最近のセッション",
|
||||
"sidebar.project.viewAllSessions": "すべてのセッションを表示",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "デスクトップ",
|
||||
"settings.section.server": "サーバー",
|
||||
"settings.tab.general": "一般",
|
||||
"settings.tab.shortcuts": "ショートカット",
|
||||
|
||||
@@ -527,63 +479,6 @@ export const dict = {
|
||||
"settings.general.row.font.title": "フォント",
|
||||
"settings.general.row.font.description": "コードブロックで使用する等幅フォントをカスタマイズします",
|
||||
|
||||
"font.option.ibmPlexMono": "IBM Plex Mono",
|
||||
"font.option.cascadiaCode": "Cascadia Code",
|
||||
"font.option.firaCode": "Fira Code",
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
"font.option.sourceCodePro": "Source Code Pro",
|
||||
"font.option.ubuntuMono": "Ubuntu Mono",
|
||||
"sound.option.alert01": "アラート 01",
|
||||
"sound.option.alert02": "アラート 02",
|
||||
"sound.option.alert03": "アラート 03",
|
||||
"sound.option.alert04": "アラート 04",
|
||||
"sound.option.alert05": "アラート 05",
|
||||
"sound.option.alert06": "アラート 06",
|
||||
"sound.option.alert07": "アラート 07",
|
||||
"sound.option.alert08": "アラート 08",
|
||||
"sound.option.alert09": "アラート 09",
|
||||
"sound.option.alert10": "アラート 10",
|
||||
"sound.option.bipbop01": "ビップボップ 01",
|
||||
"sound.option.bipbop02": "ビップボップ 02",
|
||||
"sound.option.bipbop03": "ビップボップ 03",
|
||||
"sound.option.bipbop04": "ビップボップ 04",
|
||||
"sound.option.bipbop05": "ビップボップ 05",
|
||||
"sound.option.bipbop06": "ビップボップ 06",
|
||||
"sound.option.bipbop07": "ビップボップ 07",
|
||||
"sound.option.bipbop08": "ビップボップ 08",
|
||||
"sound.option.bipbop09": "ビップボップ 09",
|
||||
"sound.option.bipbop10": "ビップボップ 10",
|
||||
"sound.option.staplebops01": "ステープルボップス 01",
|
||||
"sound.option.staplebops02": "ステープルボップス 02",
|
||||
"sound.option.staplebops03": "ステープルボップス 03",
|
||||
"sound.option.staplebops04": "ステープルボップス 04",
|
||||
"sound.option.staplebops05": "ステープルボップス 05",
|
||||
"sound.option.staplebops06": "ステープルボップス 06",
|
||||
"sound.option.staplebops07": "ステープルボップス 07",
|
||||
"sound.option.nope01": "いいえ 01",
|
||||
"sound.option.nope02": "いいえ 02",
|
||||
"sound.option.nope03": "いいえ 03",
|
||||
"sound.option.nope04": "いいえ 04",
|
||||
"sound.option.nope05": "いいえ 05",
|
||||
"sound.option.nope06": "いいえ 06",
|
||||
"sound.option.nope07": "いいえ 07",
|
||||
"sound.option.nope08": "いいえ 08",
|
||||
"sound.option.nope09": "いいえ 09",
|
||||
"sound.option.nope10": "いいえ 10",
|
||||
"sound.option.nope11": "いいえ 11",
|
||||
"sound.option.nope12": "いいえ 12",
|
||||
"sound.option.yup01": "はい 01",
|
||||
"sound.option.yup02": "はい 02",
|
||||
"sound.option.yup03": "はい 03",
|
||||
"sound.option.yup04": "はい 04",
|
||||
"sound.option.yup05": "はい 05",
|
||||
"sound.option.yup06": "はい 06",
|
||||
"settings.general.notifications.agent.title": "エージェント",
|
||||
"settings.general.notifications.agent.description":
|
||||
"エージェントが完了したか、注意が必要な場合にシステム通知を表示します",
|
||||
@@ -619,13 +514,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "プロバイダー",
|
||||
"settings.providers.description": "プロバイダー設定はここで構成できます。",
|
||||
"settings.providers.section.connected": "接続済みプロバイダー",
|
||||
"settings.providers.connected.empty": "接続済みプロバイダーはありません",
|
||||
"settings.providers.section.popular": "人気のプロバイダー",
|
||||
"settings.providers.tag.environment": "環境",
|
||||
"settings.providers.tag.config": "設定",
|
||||
"settings.providers.tag.custom": "カスタム",
|
||||
"settings.providers.tag.other": "その他",
|
||||
"settings.models.title": "モデル",
|
||||
"settings.models.description": "モデル設定はここで構成できます。",
|
||||
"settings.agents.title": "エージェント",
|
||||
@@ -692,7 +580,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "ワークスペースのリセットに失敗しました",
|
||||
"workspace.reset.success.title": "ワークスペースをリセットしました",
|
||||
"workspace.reset.success.description": "ワークスペースはデフォルトブランチと一致しています。",
|
||||
"workspace.error.stillPreparing": "ワークスペースはまだ準備中です",
|
||||
"workspace.status.checking": "未マージの変更を確認中...",
|
||||
"workspace.status.error": "gitステータスを確認できません。",
|
||||
"workspace.status.clean": "未マージの変更は検出されませんでした。",
|
||||
|
||||
@@ -12,7 +12,6 @@ export const dict = {
|
||||
"command.category.theme": "테마",
|
||||
"command.category.language": "언어",
|
||||
"command.category.file": "파일",
|
||||
"command.category.context": "컨텍스트",
|
||||
"command.category.terminal": "터미널",
|
||||
"command.category.model": "모델",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -20,7 +19,6 @@ export const dict = {
|
||||
"command.category.permissions": "권한",
|
||||
"command.category.workspace": "작업 공간",
|
||||
|
||||
"command.category.settings": "설정",
|
||||
"theme.scheme.system": "시스템",
|
||||
"theme.scheme.light": "라이트",
|
||||
"theme.scheme.dark": "다크",
|
||||
@@ -29,7 +27,6 @@ export const dict = {
|
||||
"command.project.open": "프로젝트 열기",
|
||||
"command.provider.connect": "공급자 연결",
|
||||
"command.server.switch": "서버 전환",
|
||||
"command.settings.open": "설정 열기",
|
||||
"command.session.previous": "이전 세션",
|
||||
"command.session.next": "다음 세션",
|
||||
"command.session.archive": "세션 보관",
|
||||
@@ -47,10 +44,7 @@ export const dict = {
|
||||
"command.session.new": "새 세션",
|
||||
"command.file.open": "파일 열기",
|
||||
"command.file.open.description": "파일 및 명령어 검색",
|
||||
"command.context.addSelection": "선택 영역을 컨텍스트에 추가",
|
||||
"command.context.addSelection.description": "현재 파일에서 선택한 줄을 추가",
|
||||
"command.terminal.toggle": "터미널 토글",
|
||||
"command.fileTree.toggle": "파일 트리 토글",
|
||||
"command.review.toggle": "검토 토글",
|
||||
"command.terminal.new": "새 터미널",
|
||||
"command.terminal.new.description": "새 터미널 탭 생성",
|
||||
@@ -126,7 +120,6 @@ export const dict = {
|
||||
"OpenCode Zen은 코딩 에이전트를 위해 최적화된 신뢰할 수 있는 엄선된 모델에 대한 액세스를 제공합니다.",
|
||||
"provider.connect.opencodeZen.line2": "단일 API 키로 Claude, GPT, Gemini, GLM 등 다양한 모델에 액세스할 수 있습니다.",
|
||||
"provider.connect.opencodeZen.visit.prefix": "",
|
||||
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
|
||||
"provider.connect.opencodeZen.visit.suffix": "를 방문하여 API 키를 받으세요.",
|
||||
"provider.connect.oauth.code.visit.prefix": "",
|
||||
"provider.connect.oauth.code.visit.link": "이 링크",
|
||||
@@ -144,32 +137,13 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "{{provider}} 연결됨",
|
||||
"provider.connect.toast.connected.description": "이제 {{provider}} 모델을 사용할 수 있습니다.",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "{{provider}} 연결 해제됨",
|
||||
"provider.disconnect.toast.disconnected.description": "{{provider}} 모델을 더 이상 사용할 수 없습니다.",
|
||||
"model.tag.free": "무료",
|
||||
"model.tag.latest": "최신",
|
||||
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
"model.provider.openai": "OpenAI",
|
||||
"model.provider.google": "Google",
|
||||
"model.provider.xai": "xAI",
|
||||
"model.provider.meta": "Meta",
|
||||
"model.input.text": "텍스트",
|
||||
"model.input.image": "이미지",
|
||||
"model.input.audio": "오디오",
|
||||
"model.input.video": "비디오",
|
||||
"model.input.pdf": "pdf",
|
||||
"model.tooltip.allows": "지원: {{inputs}}",
|
||||
"model.tooltip.reasoning.allowed": "추론 허용",
|
||||
"model.tooltip.reasoning.none": "추론 없음",
|
||||
"model.tooltip.context": "컨텍스트 제한 {{limit}}",
|
||||
"common.search.placeholder": "검색",
|
||||
"common.goBack": "뒤로 가기",
|
||||
"common.loading": "로딩 중",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "취소",
|
||||
"common.connect": "연결",
|
||||
"common.disconnect": "연결 해제",
|
||||
"common.submit": "제출",
|
||||
"common.save": "저장",
|
||||
"common.saving": "저장 중...",
|
||||
@@ -178,8 +152,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "셸 명령어 입력...",
|
||||
"prompt.placeholder.normal": '무엇이든 물어보세요... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "댓글 요약…",
|
||||
"prompt.placeholder.summarizeComment": "댓글 요약…",
|
||||
"prompt.mode.shell": "셸",
|
||||
"prompt.mode.shell.exit": "종료하려면 esc",
|
||||
|
||||
@@ -283,9 +255,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "색상",
|
||||
"dialog.project.edit.color.select": "{{color}} 색상 선택",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "작업 공간 시작 스크립트",
|
||||
"dialog.project.edit.worktree.startup.description": "새 작업 공간(작업 트리)을 만든 뒤 실행됩니다.",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "예: bun install",
|
||||
"context.breakdown.title": "컨텍스트 분석",
|
||||
"context.breakdown.note": '입력 토큰의 대략적인 분석입니다. "기타"에는 도구 정의 및 오버헤드가 포함됩니다.',
|
||||
"context.breakdown.system": "시스템",
|
||||
@@ -351,9 +320,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "파일 로드 실패",
|
||||
|
||||
"toast.file.listFailed.title": "파일 목록을 불러오지 못했습니다",
|
||||
"toast.context.noLineSelection.title": "줄 선택 없음",
|
||||
"toast.context.noLineSelection.description": "먼저 파일 탭에서 줄 범위를 선택하세요.",
|
||||
"toast.session.share.copyFailed.title": "URL 클립보드 복사 실패",
|
||||
"toast.session.share.success.title": "세션 공유됨",
|
||||
"toast.session.share.success.description": "공유 URL이 클립보드에 복사되었습니다!",
|
||||
@@ -427,19 +393,13 @@ export const dict = {
|
||||
"session.tab.context": "컨텍스트",
|
||||
"session.panel.reviewAndFiles": "검토 및 파일",
|
||||
"session.review.filesChanged": "{{count}}개 파일 변경됨",
|
||||
"session.review.change.one": "변경",
|
||||
"session.review.change.other": "변경",
|
||||
"session.review.loadingChanges": "변경 사항 로드 중...",
|
||||
"session.review.empty": "이 세션에 변경 사항이 아직 없습니다",
|
||||
"session.review.noChanges": "변경 없음",
|
||||
"session.files.selectToOpen": "열 파일을 선택하세요",
|
||||
"session.files.all": "모든 파일",
|
||||
"session.messages.renderEarlier": "이전 메시지 렌더링",
|
||||
"session.messages.loadingEarlier": "이전 메시지 로드 중...",
|
||||
"session.messages.loadEarlier": "이전 메시지 로드",
|
||||
"session.messages.loading": "메시지 로드 중...",
|
||||
|
||||
"session.messages.jumpToLatest": "최신으로 이동",
|
||||
"session.context.addToContext": "컨텍스트에 {{selection}} 추가",
|
||||
|
||||
"session.new.worktree.main": "메인 브랜치",
|
||||
@@ -480,9 +440,6 @@ export const dict = {
|
||||
"terminal.title.numbered": "터미널 {{number}}",
|
||||
"terminal.close": "터미널 닫기",
|
||||
|
||||
"terminal.connectionLost.title": "연결 끊김",
|
||||
"terminal.connectionLost.description":
|
||||
"터미널 연결이 중단되었습니다. 서버가 재시작하면 이런 일이 발생할 수 있습니다.",
|
||||
"common.closeTab": "탭 닫기",
|
||||
"common.dismiss": "닫기",
|
||||
"common.requestFailed": "요청 실패",
|
||||
@@ -496,8 +453,6 @@ export const dict = {
|
||||
"common.edit": "편집",
|
||||
"common.loadMore": "더 불러오기",
|
||||
|
||||
"common.key.esc": "ESC",
|
||||
"sidebar.menu.toggle": "메뉴 토글",
|
||||
"sidebar.nav.projectsAndSessions": "프로젝트 및 세션",
|
||||
"sidebar.settings": "설정",
|
||||
"sidebar.help": "도움말",
|
||||
@@ -509,9 +464,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "최근 세션",
|
||||
"sidebar.project.viewAllSessions": "모든 세션 보기",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "데스크톱",
|
||||
"settings.section.server": "서버",
|
||||
"settings.tab.general": "일반",
|
||||
"settings.tab.shortcuts": "단축키",
|
||||
|
||||
@@ -528,63 +481,6 @@ export const dict = {
|
||||
"settings.general.row.font.title": "글꼴",
|
||||
"settings.general.row.font.description": "코드 블록에 사용되는 고정폭 글꼴 사용자 지정",
|
||||
|
||||
"font.option.ibmPlexMono": "IBM Plex Mono",
|
||||
"font.option.cascadiaCode": "Cascadia Code",
|
||||
"font.option.firaCode": "Fira Code",
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
"font.option.sourceCodePro": "Source Code Pro",
|
||||
"font.option.ubuntuMono": "Ubuntu Mono",
|
||||
"sound.option.alert01": "알림 01",
|
||||
"sound.option.alert02": "알림 02",
|
||||
"sound.option.alert03": "알림 03",
|
||||
"sound.option.alert04": "알림 04",
|
||||
"sound.option.alert05": "알림 05",
|
||||
"sound.option.alert06": "알림 06",
|
||||
"sound.option.alert07": "알림 07",
|
||||
"sound.option.alert08": "알림 08",
|
||||
"sound.option.alert09": "알림 09",
|
||||
"sound.option.alert10": "알림 10",
|
||||
"sound.option.bipbop01": "빕-밥 01",
|
||||
"sound.option.bipbop02": "빕-밥 02",
|
||||
"sound.option.bipbop03": "빕-밥 03",
|
||||
"sound.option.bipbop04": "빕-밥 04",
|
||||
"sound.option.bipbop05": "빕-밥 05",
|
||||
"sound.option.bipbop06": "빕-밥 06",
|
||||
"sound.option.bipbop07": "빕-밥 07",
|
||||
"sound.option.bipbop08": "빕-밥 08",
|
||||
"sound.option.bipbop09": "빕-밥 09",
|
||||
"sound.option.bipbop10": "빕-밥 10",
|
||||
"sound.option.staplebops01": "스테이플밥스 01",
|
||||
"sound.option.staplebops02": "스테이플밥스 02",
|
||||
"sound.option.staplebops03": "스테이플밥스 03",
|
||||
"sound.option.staplebops04": "스테이플밥스 04",
|
||||
"sound.option.staplebops05": "스테이플밥스 05",
|
||||
"sound.option.staplebops06": "스테이플밥스 06",
|
||||
"sound.option.staplebops07": "스테이플밥스 07",
|
||||
"sound.option.nope01": "아니오 01",
|
||||
"sound.option.nope02": "아니오 02",
|
||||
"sound.option.nope03": "아니오 03",
|
||||
"sound.option.nope04": "아니오 04",
|
||||
"sound.option.nope05": "아니오 05",
|
||||
"sound.option.nope06": "아니오 06",
|
||||
"sound.option.nope07": "아니오 07",
|
||||
"sound.option.nope08": "아니오 08",
|
||||
"sound.option.nope09": "아니오 09",
|
||||
"sound.option.nope10": "아니오 10",
|
||||
"sound.option.nope11": "아니오 11",
|
||||
"sound.option.nope12": "아니오 12",
|
||||
"sound.option.yup01": "네 01",
|
||||
"sound.option.yup02": "네 02",
|
||||
"sound.option.yup03": "네 03",
|
||||
"sound.option.yup04": "네 04",
|
||||
"sound.option.yup05": "네 05",
|
||||
"sound.option.yup06": "네 06",
|
||||
"settings.general.notifications.agent.title": "에이전트",
|
||||
"settings.general.notifications.agent.description": "에이전트가 완료되거나 주의가 필요할 때 시스템 알림 표시",
|
||||
"settings.general.notifications.permissions.title": "권한",
|
||||
@@ -619,13 +515,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "공급자",
|
||||
"settings.providers.description": "공급자 설정은 여기서 구성할 수 있습니다.",
|
||||
"settings.providers.section.connected": "연결된 공급자",
|
||||
"settings.providers.connected.empty": "연결된 공급자 없음",
|
||||
"settings.providers.section.popular": "인기 공급자",
|
||||
"settings.providers.tag.environment": "환경",
|
||||
"settings.providers.tag.config": "구성",
|
||||
"settings.providers.tag.custom": "사용자 지정",
|
||||
"settings.providers.tag.other": "기타",
|
||||
"settings.models.title": "모델",
|
||||
"settings.models.description": "모델 설정은 여기서 구성할 수 있습니다.",
|
||||
"settings.agents.title": "에이전트",
|
||||
@@ -692,7 +581,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "작업 공간 재설정 실패",
|
||||
"workspace.reset.success.title": "작업 공간 재설정됨",
|
||||
"workspace.reset.success.description": "작업 공간이 이제 기본 브랜치와 일치합니다.",
|
||||
"workspace.error.stillPreparing": "작업 공간이 아직 준비 중입니다",
|
||||
"workspace.status.checking": "병합되지 않은 변경 사항 확인 중...",
|
||||
"workspace.status.error": "Git 상태를 확인할 수 없습니다.",
|
||||
"workspace.status.clean": "병합되지 않은 변경 사항이 감지되지 않았습니다.",
|
||||
|
||||
@@ -11,7 +11,6 @@ export const dict = {
|
||||
"command.category.theme": "Tema",
|
||||
"command.category.language": "Språk",
|
||||
"command.category.file": "Fil",
|
||||
"command.category.context": "Kontekst",
|
||||
"command.category.terminal": "Terminal",
|
||||
"command.category.model": "Modell",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -46,10 +45,7 @@ export const dict = {
|
||||
"command.session.new": "Ny sesjon",
|
||||
"command.file.open": "Åpne fil",
|
||||
"command.file.open.description": "Søk i filer og kommandoer",
|
||||
"command.context.addSelection": "Legg til markering i kontekst",
|
||||
"command.context.addSelection.description": "Legg til valgte linjer fra gjeldende fil",
|
||||
"command.terminal.toggle": "Veksle terminal",
|
||||
"command.fileTree.toggle": "Veksle filtre",
|
||||
"command.review.toggle": "Veksle gjennomgang",
|
||||
"command.terminal.new": "Ny terminal",
|
||||
"command.terminal.new.description": "Opprett en ny terminalfane",
|
||||
@@ -144,8 +140,6 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "{{provider}} tilkoblet",
|
||||
"provider.connect.toast.connected.description": "{{provider}}-modeller er nå tilgjengelige.",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "{{provider}} frakoblet",
|
||||
"provider.disconnect.toast.disconnected.description": "Modeller fra {{provider}} er ikke lenger tilgjengelige.",
|
||||
"model.tag.free": "Gratis",
|
||||
"model.tag.latest": "Nyeste",
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
@@ -168,8 +162,6 @@ export const dict = {
|
||||
"common.loading": "Laster",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "Avbryt",
|
||||
"common.connect": "Koble til",
|
||||
"common.disconnect": "Koble fra",
|
||||
"common.submit": "Send inn",
|
||||
"common.save": "Lagre",
|
||||
"common.saving": "Lagrer...",
|
||||
@@ -178,8 +170,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "Skriv inn shell-kommando...",
|
||||
"prompt.placeholder.normal": 'Spør om hva som helst... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "Oppsummer kommentarer…",
|
||||
"prompt.placeholder.summarizeComment": "Oppsummer kommentar…",
|
||||
"prompt.mode.shell": "Shell",
|
||||
"prompt.mode.shell.exit": "ESC for å avslutte",
|
||||
|
||||
@@ -283,9 +273,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "Farge",
|
||||
"dialog.project.edit.color.select": "Velg fargen {{color}}",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "Oppstartsskript for arbeidsområde",
|
||||
"dialog.project.edit.worktree.startup.description": "Kjører etter at et nytt arbeidsområde (worktree) er opprettet.",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "f.eks. bun install",
|
||||
"context.breakdown.title": "Kontekstfordeling",
|
||||
"context.breakdown.note": 'Omtrentlig fordeling av input-tokens. "Annet" inkluderer verktøydefinisjoner og overhead.',
|
||||
"context.breakdown.system": "System",
|
||||
@@ -351,9 +338,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "Kunne ikke laste fil",
|
||||
|
||||
"toast.file.listFailed.title": "Kunne ikke liste filer",
|
||||
"toast.context.noLineSelection.title": "Ingen linjevalg",
|
||||
"toast.context.noLineSelection.description": "Velg først et linjeområde i en filfane.",
|
||||
"toast.session.share.copyFailed.title": "Kunne ikke kopiere URL til utklippstavlen",
|
||||
"toast.session.share.success.title": "Sesjon delt",
|
||||
"toast.session.share.success.description": "Delings-URL kopiert til utklippstavlen!",
|
||||
@@ -428,13 +412,8 @@ export const dict = {
|
||||
"session.tab.context": "Kontekst",
|
||||
"session.panel.reviewAndFiles": "Gjennomgang og filer",
|
||||
"session.review.filesChanged": "{{count}} filer endret",
|
||||
"session.review.change.one": "Endring",
|
||||
"session.review.change.other": "Endringer",
|
||||
"session.review.loadingChanges": "Laster endringer...",
|
||||
"session.review.empty": "Ingen endringer i denne sesjonen ennå",
|
||||
"session.review.noChanges": "Ingen endringer",
|
||||
"session.files.selectToOpen": "Velg en fil å åpne",
|
||||
"session.files.all": "Alle filer",
|
||||
"session.messages.renderEarlier": "Vis tidligere meldinger",
|
||||
"session.messages.loadingEarlier": "Laster inn tidligere meldinger...",
|
||||
"session.messages.loadEarlier": "Last inn tidligere meldinger",
|
||||
@@ -492,7 +471,6 @@ export const dict = {
|
||||
"common.learnMore": "Lær mer",
|
||||
"common.rename": "Gi nytt navn",
|
||||
"common.reset": "Tilbakestill",
|
||||
"common.archive": "Arkiver",
|
||||
"common.delete": "Slett",
|
||||
"common.close": "Lukk",
|
||||
"common.edit": "Rediger",
|
||||
@@ -511,9 +489,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "Nylige sesjoner",
|
||||
"sidebar.project.viewAllSessions": "Vis alle sesjoner",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "Skrivebord",
|
||||
"settings.section.server": "Server",
|
||||
"settings.tab.general": "Generelt",
|
||||
"settings.tab.shortcuts": "Snarveier",
|
||||
|
||||
@@ -530,63 +506,6 @@ export const dict = {
|
||||
"settings.general.row.font.title": "Skrift",
|
||||
"settings.general.row.font.description": "Tilpass mono-skriften som brukes i kodeblokker",
|
||||
|
||||
"font.option.ibmPlexMono": "IBM Plex Mono",
|
||||
"font.option.cascadiaCode": "Cascadia Code",
|
||||
"font.option.firaCode": "Fira Code",
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
"font.option.sourceCodePro": "Source Code Pro",
|
||||
"font.option.ubuntuMono": "Ubuntu Mono",
|
||||
"sound.option.alert01": "Varsel 01",
|
||||
"sound.option.alert02": "Varsel 02",
|
||||
"sound.option.alert03": "Varsel 03",
|
||||
"sound.option.alert04": "Varsel 04",
|
||||
"sound.option.alert05": "Varsel 05",
|
||||
"sound.option.alert06": "Varsel 06",
|
||||
"sound.option.alert07": "Varsel 07",
|
||||
"sound.option.alert08": "Varsel 08",
|
||||
"sound.option.alert09": "Varsel 09",
|
||||
"sound.option.alert10": "Varsel 10",
|
||||
"sound.option.bipbop01": "Bip-bop 01",
|
||||
"sound.option.bipbop02": "Bip-bop 02",
|
||||
"sound.option.bipbop03": "Bip-bop 03",
|
||||
"sound.option.bipbop04": "Bip-bop 04",
|
||||
"sound.option.bipbop05": "Bip-bop 05",
|
||||
"sound.option.bipbop06": "Bip-bop 06",
|
||||
"sound.option.bipbop07": "Bip-bop 07",
|
||||
"sound.option.bipbop08": "Bip-bop 08",
|
||||
"sound.option.bipbop09": "Bip-bop 09",
|
||||
"sound.option.bipbop10": "Bip-bop 10",
|
||||
"sound.option.staplebops01": "Staplebops 01",
|
||||
"sound.option.staplebops02": "Staplebops 02",
|
||||
"sound.option.staplebops03": "Staplebops 03",
|
||||
"sound.option.staplebops04": "Staplebops 04",
|
||||
"sound.option.staplebops05": "Staplebops 05",
|
||||
"sound.option.staplebops06": "Staplebops 06",
|
||||
"sound.option.staplebops07": "Staplebops 07",
|
||||
"sound.option.nope01": "Nei 01",
|
||||
"sound.option.nope02": "Nei 02",
|
||||
"sound.option.nope03": "Nei 03",
|
||||
"sound.option.nope04": "Nei 04",
|
||||
"sound.option.nope05": "Nei 05",
|
||||
"sound.option.nope06": "Nei 06",
|
||||
"sound.option.nope07": "Nei 07",
|
||||
"sound.option.nope08": "Nei 08",
|
||||
"sound.option.nope09": "Nei 09",
|
||||
"sound.option.nope10": "Nei 10",
|
||||
"sound.option.nope11": "Nei 11",
|
||||
"sound.option.nope12": "Nei 12",
|
||||
"sound.option.yup01": "Ja 01",
|
||||
"sound.option.yup02": "Ja 02",
|
||||
"sound.option.yup03": "Ja 03",
|
||||
"sound.option.yup04": "Ja 04",
|
||||
"sound.option.yup05": "Ja 05",
|
||||
"sound.option.yup06": "Ja 06",
|
||||
"settings.general.notifications.agent.title": "Agent",
|
||||
"settings.general.notifications.agent.description":
|
||||
"Vis systemvarsel når agenten er ferdig eller trenger oppmerksomhet",
|
||||
@@ -622,13 +541,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "Leverandører",
|
||||
"settings.providers.description": "Leverandørinnstillinger vil kunne konfigureres her.",
|
||||
"settings.providers.section.connected": "Tilkoblede leverandører",
|
||||
"settings.providers.connected.empty": "Ingen tilkoblede leverandører",
|
||||
"settings.providers.section.popular": "Populære leverandører",
|
||||
"settings.providers.tag.environment": "Miljø",
|
||||
"settings.providers.tag.config": "Konfigurasjon",
|
||||
"settings.providers.tag.custom": "Tilpasset",
|
||||
"settings.providers.tag.other": "Annet",
|
||||
"settings.models.title": "Modeller",
|
||||
"settings.models.description": "Modellinnstillinger vil kunne konfigureres her.",
|
||||
"settings.agents.title": "Agenter",
|
||||
@@ -681,10 +593,6 @@ export const dict = {
|
||||
"settings.permissions.tool.doom_loop.title": "Doom Loop",
|
||||
"settings.permissions.tool.doom_loop.description": "Oppdager gjentatte verktøykall med identisk input",
|
||||
|
||||
"session.delete.failed.title": "Kunne ikke slette sesjon",
|
||||
"session.delete.title": "Slett sesjon",
|
||||
"session.delete.confirm": 'Slette sesjonen "{{name}}"?',
|
||||
"session.delete.button": "Slett sesjon",
|
||||
"workspace.new": "Nytt arbeidsområde",
|
||||
"workspace.type.local": "lokal",
|
||||
"workspace.type.sandbox": "sandkasse",
|
||||
@@ -695,7 +603,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "Kunne ikke tilbakestille arbeidsområde",
|
||||
"workspace.reset.success.title": "Arbeidsområde tilbakestilt",
|
||||
"workspace.reset.success.description": "Arbeidsområdet samsvarer nå med standardgrenen.",
|
||||
"workspace.error.stillPreparing": "Arbeidsområdet klargjøres fortsatt",
|
||||
"workspace.status.checking": "Sjekker for ikke-sammenslåtte endringer...",
|
||||
"workspace.status.error": "Kunne ikke bekrefte git-status.",
|
||||
"workspace.status.clean": "Ingen ikke-sammenslåtte endringer oppdaget.",
|
||||
|
||||
@@ -8,7 +8,6 @@ export const dict = {
|
||||
"command.category.theme": "Motyw",
|
||||
"command.category.language": "Język",
|
||||
"command.category.file": "Plik",
|
||||
"command.category.context": "Kontekst",
|
||||
"command.category.terminal": "Terminal",
|
||||
"command.category.model": "Model",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -43,10 +42,7 @@ export const dict = {
|
||||
"command.session.new": "Nowa sesja",
|
||||
"command.file.open": "Otwórz plik",
|
||||
"command.file.open.description": "Szukaj plików i poleceń",
|
||||
"command.context.addSelection": "Dodaj zaznaczenie do kontekstu",
|
||||
"command.context.addSelection.description": "Dodaj zaznaczone linie z bieżącego pliku",
|
||||
"command.terminal.toggle": "Przełącz terminal",
|
||||
"command.fileTree.toggle": "Przełącz drzewo plików",
|
||||
"command.review.toggle": "Przełącz przegląd",
|
||||
"command.terminal.new": "Nowy terminal",
|
||||
"command.terminal.new.description": "Utwórz nową kartę terminala",
|
||||
@@ -141,8 +137,6 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "Połączono {{provider}}",
|
||||
"provider.connect.toast.connected.description": "Modele {{provider}} są teraz dostępne do użycia.",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "Rozłączono {{provider}}",
|
||||
"provider.disconnect.toast.disconnected.description": "Modele {{provider}} nie są już dostępne.",
|
||||
"model.tag.free": "Darmowy",
|
||||
"model.tag.latest": "Najnowszy",
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
@@ -165,8 +159,6 @@ export const dict = {
|
||||
"common.loading": "Ładowanie",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "Anuluj",
|
||||
"common.connect": "Połącz",
|
||||
"common.disconnect": "Rozłącz",
|
||||
"common.submit": "Prześlij",
|
||||
"common.save": "Zapisz",
|
||||
"common.saving": "Zapisywanie...",
|
||||
@@ -175,8 +167,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "Wpisz polecenie terminala...",
|
||||
"prompt.placeholder.normal": 'Zapytaj o cokolwiek... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "Podsumuj komentarze…",
|
||||
"prompt.placeholder.summarizeComment": "Podsumuj komentarz…",
|
||||
"prompt.mode.shell": "Terminal",
|
||||
"prompt.mode.shell.exit": "esc aby wyjść",
|
||||
|
||||
@@ -280,10 +270,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "Kolor",
|
||||
"dialog.project.edit.color.select": "Wybierz kolor {{color}}",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "Skrypt uruchamiania przestrzeni roboczej",
|
||||
"dialog.project.edit.worktree.startup.description":
|
||||
"Uruchamiany po utworzeniu nowej przestrzeni roboczej (drzewa roboczego).",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "np. bun install",
|
||||
"context.breakdown.title": "Podział kontekstu",
|
||||
"context.breakdown.note": 'Przybliżony podział tokenów wejściowych. "Inne" obejmuje definicje narzędzi i narzut.',
|
||||
"context.breakdown.system": "System",
|
||||
@@ -349,9 +335,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "Nie udało się załadować pliku",
|
||||
|
||||
"toast.file.listFailed.title": "Nie udało się wyświetlić listy plików",
|
||||
"toast.context.noLineSelection.title": "Brak zaznaczenia linii",
|
||||
"toast.context.noLineSelection.description": "Najpierw wybierz zakres linii w zakładce pliku.",
|
||||
"toast.session.share.copyFailed.title": "Nie udało się skopiować URL do schowka",
|
||||
"toast.session.share.success.title": "Sesja udostępniona",
|
||||
"toast.session.share.success.description": "Link udostępniania skopiowany do schowka!",
|
||||
@@ -427,13 +410,8 @@ export const dict = {
|
||||
"session.tab.context": "Kontekst",
|
||||
"session.panel.reviewAndFiles": "Przegląd i pliki",
|
||||
"session.review.filesChanged": "Zmieniono {{count}} plików",
|
||||
"session.review.change.one": "Zmiana",
|
||||
"session.review.change.other": "Zmiany",
|
||||
"session.review.loadingChanges": "Ładowanie zmian...",
|
||||
"session.review.empty": "Brak zmian w tej sesji",
|
||||
"session.review.noChanges": "Brak zmian",
|
||||
"session.files.selectToOpen": "Wybierz plik do otwarcia",
|
||||
"session.files.all": "Wszystkie pliki",
|
||||
"session.messages.renderEarlier": "Renderuj wcześniejsze wiadomości",
|
||||
"session.messages.loadingEarlier": "Ładowanie wcześniejszych wiadomości...",
|
||||
"session.messages.loadEarlier": "Załaduj wcześniejsze wiadomości",
|
||||
@@ -510,9 +488,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "Ostatnie sesje",
|
||||
"sidebar.project.viewAllSessions": "Zobacz wszystkie sesje",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "Pulpit",
|
||||
"settings.section.server": "Serwer",
|
||||
"settings.tab.general": "Ogólne",
|
||||
"settings.tab.shortcuts": "Skróty",
|
||||
|
||||
@@ -534,7 +510,6 @@ export const dict = {
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
@@ -622,13 +597,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "Dostawcy",
|
||||
"settings.providers.description": "Ustawienia dostawców będą tutaj konfigurowalne.",
|
||||
"settings.providers.section.connected": "Połączeni dostawcy",
|
||||
"settings.providers.connected.empty": "Brak połączonych dostawców",
|
||||
"settings.providers.section.popular": "Popularni dostawcy",
|
||||
"settings.providers.tag.environment": "Środowisko",
|
||||
"settings.providers.tag.config": "Konfiguracja",
|
||||
"settings.providers.tag.custom": "Niestandardowe",
|
||||
"settings.providers.tag.other": "Inne",
|
||||
"settings.models.title": "Modele",
|
||||
"settings.models.description": "Ustawienia modeli będą tutaj konfigurowalne.",
|
||||
"settings.agents.title": "Agenci",
|
||||
@@ -695,7 +663,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "Nie udało się zresetować przestrzeni roboczej",
|
||||
"workspace.reset.success.title": "Przestrzeń robocza zresetowana",
|
||||
"workspace.reset.success.description": "Przestrzeń robocza odpowiada teraz domyślnej gałęzi.",
|
||||
"workspace.error.stillPreparing": "Przestrzeń robocza jest wciąż przygotowywana",
|
||||
"workspace.status.checking": "Sprawdzanie niezscalonych zmian...",
|
||||
"workspace.status.error": "Nie można zweryfikować statusu git.",
|
||||
"workspace.status.clean": "Nie wykryto niezscalonych zmian.",
|
||||
|
||||
@@ -8,7 +8,6 @@ export const dict = {
|
||||
"command.category.theme": "Тема",
|
||||
"command.category.language": "Язык",
|
||||
"command.category.file": "Файл",
|
||||
"command.category.context": "Контекст",
|
||||
"command.category.terminal": "Терминал",
|
||||
"command.category.model": "Модель",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -43,10 +42,7 @@ export const dict = {
|
||||
"command.session.new": "Новая сессия",
|
||||
"command.file.open": "Открыть файл",
|
||||
"command.file.open.description": "Поиск файлов и команд",
|
||||
"command.context.addSelection": "Добавить выделение в контекст",
|
||||
"command.context.addSelection.description": "Добавить выбранные строки из текущего файла",
|
||||
"command.terminal.toggle": "Переключить терминал",
|
||||
"command.fileTree.toggle": "Переключить дерево файлов",
|
||||
"command.review.toggle": "Переключить обзор",
|
||||
"command.terminal.new": "Новый терминал",
|
||||
"command.terminal.new.description": "Создать новую вкладку терминала",
|
||||
@@ -141,8 +137,6 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "{{provider}} подключён",
|
||||
"provider.connect.toast.connected.description": "Модели {{provider}} теперь доступны.",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "{{provider}} отключён",
|
||||
"provider.disconnect.toast.disconnected.description": "Модели {{provider}} больше недоступны.",
|
||||
"model.tag.free": "Бесплатно",
|
||||
"model.tag.latest": "Последняя",
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
@@ -165,8 +159,6 @@ export const dict = {
|
||||
"common.loading": "Загрузка",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "Отмена",
|
||||
"common.connect": "Подключить",
|
||||
"common.disconnect": "Отключить",
|
||||
"common.submit": "Отправить",
|
||||
"common.save": "Сохранить",
|
||||
"common.saving": "Сохранение...",
|
||||
@@ -175,8 +167,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "Введите команду оболочки...",
|
||||
"prompt.placeholder.normal": 'Спросите что угодно... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "Суммировать комментарии…",
|
||||
"prompt.placeholder.summarizeComment": "Суммировать комментарий…",
|
||||
"prompt.mode.shell": "Оболочка",
|
||||
"prompt.mode.shell.exit": "esc для выхода",
|
||||
|
||||
@@ -280,10 +270,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "Цвет",
|
||||
"dialog.project.edit.color.select": "Выбрать цвет {{color}}",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "Скрипт запуска рабочего пространства",
|
||||
"dialog.project.edit.worktree.startup.description":
|
||||
"Запускается после создания нового рабочего пространства (worktree).",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "например, bun install",
|
||||
"context.breakdown.title": "Разбивка контекста",
|
||||
"context.breakdown.note":
|
||||
'Приблизительная разбивка входных токенов. "Другое" включает определения инструментов и накладные расходы.',
|
||||
@@ -350,9 +336,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "Не удалось загрузить файл",
|
||||
|
||||
"toast.file.listFailed.title": "Не удалось получить список файлов",
|
||||
"toast.context.noLineSelection.title": "Нет выделения строк",
|
||||
"toast.context.noLineSelection.description": "Сначала выберите диапазон строк во вкладке файла.",
|
||||
"toast.session.share.copyFailed.title": "Не удалось скопировать URL в буфер обмена",
|
||||
"toast.session.share.success.title": "Сессия опубликована",
|
||||
"toast.session.share.success.description": "URL скопирован в буфер обмена!",
|
||||
@@ -429,13 +412,8 @@ export const dict = {
|
||||
"session.tab.context": "Контекст",
|
||||
"session.panel.reviewAndFiles": "Обзор и файлы",
|
||||
"session.review.filesChanged": "{{count}} файлов изменено",
|
||||
"session.review.change.one": "Изменение",
|
||||
"session.review.change.other": "Изменения",
|
||||
"session.review.loadingChanges": "Загрузка изменений...",
|
||||
"session.review.empty": "Изменений в этой сессии пока нет",
|
||||
"session.review.noChanges": "Нет изменений",
|
||||
"session.files.selectToOpen": "Выберите файл, чтобы открыть",
|
||||
"session.files.all": "Все файлы",
|
||||
"session.messages.renderEarlier": "Показать предыдущие сообщения",
|
||||
"session.messages.loadingEarlier": "Загрузка предыдущих сообщений...",
|
||||
"session.messages.loadEarlier": "Загрузить предыдущие сообщения",
|
||||
@@ -513,9 +491,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "Недавние сессии",
|
||||
"sidebar.project.viewAllSessions": "Посмотреть все сессии",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "Приложение",
|
||||
"settings.section.server": "Сервер",
|
||||
"settings.tab.general": "Основные",
|
||||
"settings.tab.shortcuts": "Горячие клавиши",
|
||||
|
||||
@@ -537,7 +513,6 @@ export const dict = {
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
@@ -625,13 +600,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "Провайдеры",
|
||||
"settings.providers.description": "Настройки провайдеров будут доступны здесь.",
|
||||
"settings.providers.section.connected": "Подключённые провайдеры",
|
||||
"settings.providers.connected.empty": "Нет подключённых провайдеров",
|
||||
"settings.providers.section.popular": "Популярные провайдеры",
|
||||
"settings.providers.tag.environment": "Среда",
|
||||
"settings.providers.tag.config": "Конфигурация",
|
||||
"settings.providers.tag.custom": "Пользовательский",
|
||||
"settings.providers.tag.other": "Другое",
|
||||
"settings.models.title": "Модели",
|
||||
"settings.models.description": "Настройки моделей будут доступны здесь.",
|
||||
"settings.agents.title": "Агенты",
|
||||
@@ -699,7 +667,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "Не удалось сбросить рабочее пространство",
|
||||
"workspace.reset.success.title": "Рабочее пространство сброшено",
|
||||
"workspace.reset.success.description": "Рабочее пространство теперь соответствует ветке по умолчанию.",
|
||||
"workspace.error.stillPreparing": "Рабочее пространство всё ещё готовится",
|
||||
"workspace.status.checking": "Проверка наличия неслитых изменений...",
|
||||
"workspace.status.error": "Не удалось проверить статус git.",
|
||||
"workspace.status.clean": "Неслитые изменения не обнаружены.",
|
||||
|
||||
@@ -12,7 +12,6 @@ export const dict = {
|
||||
"command.category.theme": "主题",
|
||||
"command.category.language": "语言",
|
||||
"command.category.file": "文件",
|
||||
"command.category.context": "上下文",
|
||||
"command.category.terminal": "终端",
|
||||
"command.category.model": "模型",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -20,7 +19,6 @@ export const dict = {
|
||||
"command.category.permissions": "权限",
|
||||
"command.category.workspace": "工作区",
|
||||
|
||||
"command.category.settings": "设置",
|
||||
"theme.scheme.system": "系统",
|
||||
"theme.scheme.light": "浅色",
|
||||
"theme.scheme.dark": "深色",
|
||||
@@ -29,7 +27,6 @@ export const dict = {
|
||||
"command.project.open": "打开项目",
|
||||
"command.provider.connect": "连接提供商",
|
||||
"command.server.switch": "切换服务器",
|
||||
"command.settings.open": "打开设置",
|
||||
"command.session.previous": "上一个会话",
|
||||
"command.session.next": "下一个会话",
|
||||
"command.session.archive": "归档会话",
|
||||
@@ -47,10 +44,7 @@ export const dict = {
|
||||
"command.session.new": "新建会话",
|
||||
"command.file.open": "打开文件",
|
||||
"command.file.open.description": "搜索文件和命令",
|
||||
"command.context.addSelection": "将所选内容添加到上下文",
|
||||
"command.context.addSelection.description": "添加当前文件中选中的行",
|
||||
"command.terminal.toggle": "切换终端",
|
||||
"command.fileTree.toggle": "切换文件树",
|
||||
"command.review.toggle": "切换审查",
|
||||
"command.terminal.new": "新建终端",
|
||||
"command.terminal.new.description": "创建新的终端标签页",
|
||||
@@ -125,7 +119,6 @@ export const dict = {
|
||||
"provider.connect.opencodeZen.line1": "OpenCode Zen 为你提供一组精选的可靠优化模型,用于代码智能体。",
|
||||
"provider.connect.opencodeZen.line2": "只需一个 API 密钥,你就能使用 Claude、GPT、Gemini、GLM 等模型。",
|
||||
"provider.connect.opencodeZen.visit.prefix": "访问 ",
|
||||
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
|
||||
"provider.connect.opencodeZen.visit.suffix": " 获取你的 API 密钥。",
|
||||
"provider.connect.oauth.code.visit.prefix": "访问 ",
|
||||
"provider.connect.oauth.code.visit.link": "此链接",
|
||||
@@ -141,32 +134,13 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "{{provider}} 已连接",
|
||||
"provider.connect.toast.connected.description": "现在可以使用 {{provider}} 模型了。",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "{{provider}} 已断开连接",
|
||||
"provider.disconnect.toast.disconnected.description": "{{provider}} 模型已不再可用。",
|
||||
"model.tag.free": "免费",
|
||||
"model.tag.latest": "最新",
|
||||
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
"model.provider.openai": "OpenAI",
|
||||
"model.provider.google": "Google",
|
||||
"model.provider.xai": "xAI",
|
||||
"model.provider.meta": "Meta",
|
||||
"model.input.text": "文本",
|
||||
"model.input.image": "图像",
|
||||
"model.input.audio": "音频",
|
||||
"model.input.video": "视频",
|
||||
"model.input.pdf": "pdf",
|
||||
"model.tooltip.allows": "支持: {{inputs}}",
|
||||
"model.tooltip.reasoning.allowed": "支持推理",
|
||||
"model.tooltip.reasoning.none": "不支持推理",
|
||||
"model.tooltip.context": "上下文上限 {{limit}}",
|
||||
"common.search.placeholder": "搜索",
|
||||
"common.goBack": "返回",
|
||||
"common.loading": "加载中",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "取消",
|
||||
"common.connect": "连接",
|
||||
"common.disconnect": "断开连接",
|
||||
"common.submit": "提交",
|
||||
"common.save": "保存",
|
||||
"common.saving": "保存中...",
|
||||
@@ -175,8 +149,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "输入 shell 命令...",
|
||||
"prompt.placeholder.normal": '随便问点什么... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "总结评论…",
|
||||
"prompt.placeholder.summarizeComment": "总结该评论…",
|
||||
"prompt.mode.shell": "Shell",
|
||||
"prompt.mode.shell.exit": "按 esc 退出",
|
||||
|
||||
@@ -279,9 +251,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "颜色",
|
||||
"dialog.project.edit.color.select": "选择{{color}}颜色",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "工作区启动脚本",
|
||||
"dialog.project.edit.worktree.startup.description": "在创建新的工作区 (worktree) 后运行。",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "例如 bun install",
|
||||
"context.breakdown.title": "上下文拆分",
|
||||
"context.breakdown.note": "输入 token 的大致拆分。“其他”包含工具定义和开销。",
|
||||
"context.breakdown.system": "系统",
|
||||
@@ -347,9 +316,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "加载文件失败",
|
||||
|
||||
"toast.file.listFailed.title": "列出文件失败",
|
||||
"toast.context.noLineSelection.title": "未选择行",
|
||||
"toast.context.noLineSelection.description": "请先在文件标签中选择行范围。",
|
||||
"toast.session.share.copyFailed.title": "无法复制链接到剪贴板",
|
||||
"toast.session.share.success.title": "会话已分享",
|
||||
"toast.session.share.success.description": "分享链接已复制到剪贴板",
|
||||
@@ -422,19 +388,13 @@ export const dict = {
|
||||
"session.tab.context": "上下文",
|
||||
"session.panel.reviewAndFiles": "审查和文件",
|
||||
"session.review.filesChanged": "{{count}} 个文件变更",
|
||||
"session.review.change.one": "更改",
|
||||
"session.review.change.other": "更改",
|
||||
"session.review.loadingChanges": "正在加载更改...",
|
||||
"session.review.empty": "此会话暂无更改",
|
||||
"session.review.noChanges": "无更改",
|
||||
"session.files.selectToOpen": "选择要打开的文件",
|
||||
"session.files.all": "所有文件",
|
||||
"session.messages.renderEarlier": "显示更早的消息",
|
||||
"session.messages.loadingEarlier": "正在加载更早的消息...",
|
||||
"session.messages.loadEarlier": "加载更早的消息",
|
||||
"session.messages.loading": "正在加载消息...",
|
||||
|
||||
"session.messages.jumpToLatest": "跳转到最新",
|
||||
"session.context.addToContext": "将 {{selection}} 添加到上下文",
|
||||
|
||||
"session.new.worktree.main": "主分支",
|
||||
@@ -474,8 +434,6 @@ export const dict = {
|
||||
"terminal.title.numbered": "终端 {{number}}",
|
||||
"terminal.close": "关闭终端",
|
||||
|
||||
"terminal.connectionLost.title": "连接已丢失",
|
||||
"terminal.connectionLost.description": "终端连接已中断。这可能发生在服务器重启时。",
|
||||
"common.closeTab": "关闭标签页",
|
||||
"common.dismiss": "忽略",
|
||||
"common.requestFailed": "请求失败",
|
||||
@@ -489,8 +447,6 @@ export const dict = {
|
||||
"common.edit": "编辑",
|
||||
"common.loadMore": "加载更多",
|
||||
|
||||
"common.key.esc": "ESC",
|
||||
"sidebar.menu.toggle": "切换菜单",
|
||||
"sidebar.nav.projectsAndSessions": "项目和会话",
|
||||
"sidebar.settings": "设置",
|
||||
"sidebar.help": "帮助",
|
||||
@@ -502,9 +458,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "最近会话",
|
||||
"sidebar.project.viewAllSessions": "查看全部会话",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "桌面",
|
||||
"settings.section.server": "服务器",
|
||||
"settings.tab.general": "通用",
|
||||
"settings.tab.shortcuts": "快捷键",
|
||||
|
||||
@@ -521,63 +475,6 @@ export const dict = {
|
||||
"settings.general.row.font.title": "字体",
|
||||
"settings.general.row.font.description": "自定义代码块使用的等宽字体",
|
||||
|
||||
"font.option.ibmPlexMono": "IBM Plex Mono",
|
||||
"font.option.cascadiaCode": "Cascadia Code",
|
||||
"font.option.firaCode": "Fira Code",
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
"font.option.sourceCodePro": "Source Code Pro",
|
||||
"font.option.ubuntuMono": "Ubuntu Mono",
|
||||
"sound.option.alert01": "警报 01",
|
||||
"sound.option.alert02": "警报 02",
|
||||
"sound.option.alert03": "警报 03",
|
||||
"sound.option.alert04": "警报 04",
|
||||
"sound.option.alert05": "警报 05",
|
||||
"sound.option.alert06": "警报 06",
|
||||
"sound.option.alert07": "警报 07",
|
||||
"sound.option.alert08": "警报 08",
|
||||
"sound.option.alert09": "警报 09",
|
||||
"sound.option.alert10": "警报 10",
|
||||
"sound.option.bipbop01": "哔啵 01",
|
||||
"sound.option.bipbop02": "哔啵 02",
|
||||
"sound.option.bipbop03": "哔啵 03",
|
||||
"sound.option.bipbop04": "哔啵 04",
|
||||
"sound.option.bipbop05": "哔啵 05",
|
||||
"sound.option.bipbop06": "哔啵 06",
|
||||
"sound.option.bipbop07": "哔啵 07",
|
||||
"sound.option.bipbop08": "哔啵 08",
|
||||
"sound.option.bipbop09": "哔啵 09",
|
||||
"sound.option.bipbop10": "哔啵 10",
|
||||
"sound.option.staplebops01": "斯泰普博普斯 01",
|
||||
"sound.option.staplebops02": "斯泰普博普斯 02",
|
||||
"sound.option.staplebops03": "斯泰普博普斯 03",
|
||||
"sound.option.staplebops04": "斯泰普博普斯 04",
|
||||
"sound.option.staplebops05": "斯泰普博普斯 05",
|
||||
"sound.option.staplebops06": "斯泰普博普斯 06",
|
||||
"sound.option.staplebops07": "斯泰普博普斯 07",
|
||||
"sound.option.nope01": "否 01",
|
||||
"sound.option.nope02": "否 02",
|
||||
"sound.option.nope03": "否 03",
|
||||
"sound.option.nope04": "否 04",
|
||||
"sound.option.nope05": "否 05",
|
||||
"sound.option.nope06": "否 06",
|
||||
"sound.option.nope07": "否 07",
|
||||
"sound.option.nope08": "否 08",
|
||||
"sound.option.nope09": "否 09",
|
||||
"sound.option.nope10": "否 10",
|
||||
"sound.option.nope11": "否 11",
|
||||
"sound.option.nope12": "否 12",
|
||||
"sound.option.yup01": "是 01",
|
||||
"sound.option.yup02": "是 02",
|
||||
"sound.option.yup03": "是 03",
|
||||
"sound.option.yup04": "是 04",
|
||||
"sound.option.yup05": "是 05",
|
||||
"sound.option.yup06": "是 06",
|
||||
"settings.general.notifications.agent.title": "智能体",
|
||||
"settings.general.notifications.agent.description": "当智能体完成或需要注意时显示系统通知",
|
||||
"settings.general.notifications.permissions.title": "权限",
|
||||
@@ -612,13 +509,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "提供商",
|
||||
"settings.providers.description": "提供商设置将在此处可配置。",
|
||||
"settings.providers.section.connected": "已连接的提供商",
|
||||
"settings.providers.connected.empty": "没有已连接的提供商",
|
||||
"settings.providers.section.popular": "热门提供商",
|
||||
"settings.providers.tag.environment": "环境",
|
||||
"settings.providers.tag.config": "配置",
|
||||
"settings.providers.tag.custom": "自定义",
|
||||
"settings.providers.tag.other": "其他",
|
||||
"settings.models.title": "模型",
|
||||
"settings.models.description": "模型设置将在此处可配置。",
|
||||
"settings.agents.title": "智能体",
|
||||
@@ -685,7 +575,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "重置工作区失败",
|
||||
"workspace.reset.success.title": "工作区已重置",
|
||||
"workspace.reset.success.description": "工作区已与默认分支保持一致。",
|
||||
"workspace.error.stillPreparing": "工作区仍在准备中",
|
||||
"workspace.status.checking": "正在检查未合并的更改...",
|
||||
"workspace.status.error": "无法验证 git 状态。",
|
||||
"workspace.status.clean": "未检测到未合并的更改。",
|
||||
|
||||
@@ -12,7 +12,6 @@ export const dict = {
|
||||
"command.category.theme": "主題",
|
||||
"command.category.language": "語言",
|
||||
"command.category.file": "檔案",
|
||||
"command.category.context": "上下文",
|
||||
"command.category.terminal": "終端機",
|
||||
"command.category.model": "模型",
|
||||
"command.category.mcp": "MCP",
|
||||
@@ -20,7 +19,6 @@ export const dict = {
|
||||
"command.category.permissions": "權限",
|
||||
"command.category.workspace": "工作區",
|
||||
|
||||
"command.category.settings": "設定",
|
||||
"theme.scheme.system": "系統",
|
||||
"theme.scheme.light": "淺色",
|
||||
"theme.scheme.dark": "深色",
|
||||
@@ -29,7 +27,6 @@ export const dict = {
|
||||
"command.project.open": "開啟專案",
|
||||
"command.provider.connect": "連接提供者",
|
||||
"command.server.switch": "切換伺服器",
|
||||
"command.settings.open": "開啟設定",
|
||||
"command.session.previous": "上一個工作階段",
|
||||
"command.session.next": "下一個工作階段",
|
||||
"command.session.archive": "封存工作階段",
|
||||
@@ -47,10 +44,7 @@ export const dict = {
|
||||
"command.session.new": "新增工作階段",
|
||||
"command.file.open": "開啟檔案",
|
||||
"command.file.open.description": "搜尋檔案和命令",
|
||||
"command.context.addSelection": "將選取內容加入上下文",
|
||||
"command.context.addSelection.description": "加入目前檔案中選取的行",
|
||||
"command.terminal.toggle": "切換終端機",
|
||||
"command.fileTree.toggle": "切換檔案樹",
|
||||
"command.review.toggle": "切換審查",
|
||||
"command.terminal.new": "新增終端機",
|
||||
"command.terminal.new.description": "建立新的終端機標籤頁",
|
||||
@@ -142,32 +136,13 @@ export const dict = {
|
||||
"provider.connect.toast.connected.title": "{{provider}} 已連線",
|
||||
"provider.connect.toast.connected.description": "現在可以使用 {{provider}} 模型了。",
|
||||
|
||||
"provider.disconnect.toast.disconnected.title": "{{provider}} 已中斷連線",
|
||||
"provider.disconnect.toast.disconnected.description": "{{provider}} 模型已不再可用。",
|
||||
"model.tag.free": "免費",
|
||||
"model.tag.latest": "最新",
|
||||
|
||||
"model.provider.anthropic": "Anthropic",
|
||||
"model.provider.openai": "OpenAI",
|
||||
"model.provider.google": "Google",
|
||||
"model.provider.xai": "xAI",
|
||||
"model.provider.meta": "Meta",
|
||||
"model.input.text": "文字",
|
||||
"model.input.image": "圖片",
|
||||
"model.input.audio": "音訊",
|
||||
"model.input.video": "影片",
|
||||
"model.input.pdf": "pdf",
|
||||
"model.tooltip.allows": "支援: {{inputs}}",
|
||||
"model.tooltip.reasoning.allowed": "支援推理",
|
||||
"model.tooltip.reasoning.none": "不支援推理",
|
||||
"model.tooltip.context": "上下文上限 {{limit}}",
|
||||
"common.search.placeholder": "搜尋",
|
||||
"common.goBack": "返回",
|
||||
"common.loading": "載入中",
|
||||
"common.loading.ellipsis": "...",
|
||||
"common.cancel": "取消",
|
||||
"common.connect": "連線",
|
||||
"common.disconnect": "中斷連線",
|
||||
"common.submit": "提交",
|
||||
"common.save": "儲存",
|
||||
"common.saving": "儲存中...",
|
||||
@@ -176,8 +151,6 @@ export const dict = {
|
||||
|
||||
"prompt.placeholder.shell": "輸入 shell 命令...",
|
||||
"prompt.placeholder.normal": '隨便問點什麼... "{{example}}"',
|
||||
"prompt.placeholder.summarizeComments": "摘要評論…",
|
||||
"prompt.placeholder.summarizeComment": "摘要這則評論…",
|
||||
"prompt.mode.shell": "Shell",
|
||||
"prompt.mode.shell.exit": "按 esc 退出",
|
||||
|
||||
@@ -280,9 +253,6 @@ export const dict = {
|
||||
"dialog.project.edit.color": "顏色",
|
||||
"dialog.project.edit.color.select": "選擇{{color}}顏色",
|
||||
|
||||
"dialog.project.edit.worktree.startup": "工作區啟動腳本",
|
||||
"dialog.project.edit.worktree.startup.description": "在建立新的工作區 (worktree) 後執行。",
|
||||
"dialog.project.edit.worktree.startup.placeholder": "例如 bun install",
|
||||
"context.breakdown.title": "上下文拆分",
|
||||
"context.breakdown.note": "輸入 token 的大致拆分。「其他」包含工具定義和額外開銷。",
|
||||
"context.breakdown.system": "系統",
|
||||
@@ -348,9 +318,6 @@ export const dict = {
|
||||
|
||||
"toast.file.loadFailed.title": "載入檔案失敗",
|
||||
|
||||
"toast.file.listFailed.title": "列出檔案失敗",
|
||||
"toast.context.noLineSelection.title": "未選取行",
|
||||
"toast.context.noLineSelection.description": "請先在檔案分頁中選取行範圍。",
|
||||
"toast.session.share.copyFailed.title": "無法複製連結到剪貼簿",
|
||||
"toast.session.share.success.title": "工作階段已分享",
|
||||
"toast.session.share.success.description": "分享連結已複製到剪貼簿",
|
||||
@@ -423,19 +390,13 @@ export const dict = {
|
||||
"session.tab.context": "上下文",
|
||||
"session.panel.reviewAndFiles": "審查與檔案",
|
||||
"session.review.filesChanged": "{{count}} 個檔案變更",
|
||||
"session.review.change.one": "變更",
|
||||
"session.review.change.other": "變更",
|
||||
"session.review.loadingChanges": "正在載入變更...",
|
||||
"session.review.empty": "此工作階段暫無變更",
|
||||
"session.review.noChanges": "沒有變更",
|
||||
"session.files.selectToOpen": "選取要開啟的檔案",
|
||||
"session.files.all": "所有檔案",
|
||||
"session.messages.renderEarlier": "顯示更早的訊息",
|
||||
"session.messages.loadingEarlier": "正在載入更早的訊息...",
|
||||
"session.messages.loadEarlier": "載入更早的訊息",
|
||||
"session.messages.loading": "正在載入訊息...",
|
||||
|
||||
"session.messages.jumpToLatest": "跳到最新",
|
||||
"session.context.addToContext": "將 {{selection}} 新增到上下文",
|
||||
|
||||
"session.new.worktree.main": "主分支",
|
||||
@@ -475,8 +436,6 @@ export const dict = {
|
||||
"terminal.title.numbered": "終端機 {{number}}",
|
||||
"terminal.close": "關閉終端機",
|
||||
|
||||
"terminal.connectionLost.title": "連線中斷",
|
||||
"terminal.connectionLost.description": "終端機連線已中斷。這可能會在伺服器重新啟動時發生。",
|
||||
"common.closeTab": "關閉標籤頁",
|
||||
"common.dismiss": "忽略",
|
||||
"common.requestFailed": "要求失敗",
|
||||
@@ -490,8 +449,6 @@ export const dict = {
|
||||
"common.edit": "編輯",
|
||||
"common.loadMore": "載入更多",
|
||||
|
||||
"common.key.esc": "ESC",
|
||||
"sidebar.menu.toggle": "切換選單",
|
||||
"sidebar.nav.projectsAndSessions": "專案與工作階段",
|
||||
"sidebar.settings": "設定",
|
||||
"sidebar.help": "說明",
|
||||
@@ -503,9 +460,7 @@ export const dict = {
|
||||
"sidebar.project.recentSessions": "最近工作階段",
|
||||
"sidebar.project.viewAllSessions": "查看全部工作階段",
|
||||
|
||||
"app.name.desktop": "OpenCode Desktop",
|
||||
"settings.section.desktop": "桌面",
|
||||
"settings.section.server": "伺服器",
|
||||
"settings.tab.general": "一般",
|
||||
"settings.tab.shortcuts": "快速鍵",
|
||||
|
||||
@@ -522,63 +477,6 @@ export const dict = {
|
||||
"settings.general.row.font.title": "字型",
|
||||
"settings.general.row.font.description": "自訂程式碼區塊使用的等寬字型",
|
||||
|
||||
"font.option.ibmPlexMono": "IBM Plex Mono",
|
||||
"font.option.cascadiaCode": "Cascadia Code",
|
||||
"font.option.firaCode": "Fira Code",
|
||||
"font.option.hack": "Hack",
|
||||
"font.option.inconsolata": "Inconsolata",
|
||||
"font.option.intelOneMono": "Intel One Mono",
|
||||
"font.option.iosevka": "Iosevka",
|
||||
"font.option.jetbrainsMono": "JetBrains Mono",
|
||||
"font.option.mesloLgs": "Meslo LGS",
|
||||
"font.option.robotoMono": "Roboto Mono",
|
||||
"font.option.sourceCodePro": "Source Code Pro",
|
||||
"font.option.ubuntuMono": "Ubuntu Mono",
|
||||
"sound.option.alert01": "警報 01",
|
||||
"sound.option.alert02": "警報 02",
|
||||
"sound.option.alert03": "警報 03",
|
||||
"sound.option.alert04": "警報 04",
|
||||
"sound.option.alert05": "警報 05",
|
||||
"sound.option.alert06": "警報 06",
|
||||
"sound.option.alert07": "警報 07",
|
||||
"sound.option.alert08": "警報 08",
|
||||
"sound.option.alert09": "警報 09",
|
||||
"sound.option.alert10": "警報 10",
|
||||
"sound.option.bipbop01": "嗶啵 01",
|
||||
"sound.option.bipbop02": "嗶啵 02",
|
||||
"sound.option.bipbop03": "嗶啵 03",
|
||||
"sound.option.bipbop04": "嗶啵 04",
|
||||
"sound.option.bipbop05": "嗶啵 05",
|
||||
"sound.option.bipbop06": "嗶啵 06",
|
||||
"sound.option.bipbop07": "嗶啵 07",
|
||||
"sound.option.bipbop08": "嗶啵 08",
|
||||
"sound.option.bipbop09": "嗶啵 09",
|
||||
"sound.option.bipbop10": "嗶啵 10",
|
||||
"sound.option.staplebops01": "斯泰普博普斯 01",
|
||||
"sound.option.staplebops02": "斯泰普博普斯 02",
|
||||
"sound.option.staplebops03": "斯泰普博普斯 03",
|
||||
"sound.option.staplebops04": "斯泰普博普斯 04",
|
||||
"sound.option.staplebops05": "斯泰普博普斯 05",
|
||||
"sound.option.staplebops06": "斯泰普博普斯 06",
|
||||
"sound.option.staplebops07": "斯泰普博普斯 07",
|
||||
"sound.option.nope01": "否 01",
|
||||
"sound.option.nope02": "否 02",
|
||||
"sound.option.nope03": "否 03",
|
||||
"sound.option.nope04": "否 04",
|
||||
"sound.option.nope05": "否 05",
|
||||
"sound.option.nope06": "否 06",
|
||||
"sound.option.nope07": "否 07",
|
||||
"sound.option.nope08": "否 08",
|
||||
"sound.option.nope09": "否 09",
|
||||
"sound.option.nope10": "否 10",
|
||||
"sound.option.nope11": "否 11",
|
||||
"sound.option.nope12": "否 12",
|
||||
"sound.option.yup01": "是 01",
|
||||
"sound.option.yup02": "是 02",
|
||||
"sound.option.yup03": "是 03",
|
||||
"sound.option.yup04": "是 04",
|
||||
"sound.option.yup05": "是 05",
|
||||
"sound.option.yup06": "是 06",
|
||||
"settings.general.notifications.agent.title": "代理程式",
|
||||
"settings.general.notifications.agent.description": "當代理程式完成或需要注意時顯示系統通知",
|
||||
"settings.general.notifications.permissions.title": "權限",
|
||||
@@ -613,13 +511,6 @@ export const dict = {
|
||||
|
||||
"settings.providers.title": "提供者",
|
||||
"settings.providers.description": "提供者設定將在此處可設定。",
|
||||
"settings.providers.section.connected": "已連線的提供商",
|
||||
"settings.providers.connected.empty": "沒有已連線的提供商",
|
||||
"settings.providers.section.popular": "熱門提供商",
|
||||
"settings.providers.tag.environment": "環境",
|
||||
"settings.providers.tag.config": "配置",
|
||||
"settings.providers.tag.custom": "自訂",
|
||||
"settings.providers.tag.other": "其他",
|
||||
"settings.models.title": "模型",
|
||||
"settings.models.description": "模型設定將在此處可設定。",
|
||||
"settings.agents.title": "代理程式",
|
||||
@@ -686,7 +577,6 @@ export const dict = {
|
||||
"workspace.reset.failed.title": "重設工作區失敗",
|
||||
"workspace.reset.success.title": "工作區已重設",
|
||||
"workspace.reset.success.description": "工作區已與預設分支保持一致。",
|
||||
"workspace.error.stillPreparing": "工作區仍在準備中",
|
||||
"workspace.status.checking": "正在檢查未合併的變更...",
|
||||
"workspace.status.error": "無法驗證 git 狀態。",
|
||||
"workspace.status.clean": "未偵測到未合併的變更。",
|
||||
|
||||
@@ -55,30 +55,3 @@
|
||||
scrollbar-width: thin !important;
|
||||
scrollbar-color: var(--border-weak-base) transparent !important;
|
||||
}
|
||||
|
||||
/* Wider dialog variant for release notes modal */
|
||||
[data-component="dialog"]:has(.dialog-release-notes) {
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
|
||||
[data-slot="dialog-container"] {
|
||||
width: min(100%, 720px);
|
||||
height: min(100%, 400px);
|
||||
margin-top: -80px;
|
||||
|
||||
[data-slot="dialog-content"] {
|
||||
min-height: auto;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
border: none;
|
||||
box-shadow: var(--shadow-lg-border-base);
|
||||
}
|
||||
|
||||
[data-slot="dialog-body"] {
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ export default function Layout(props: ParentProps) {
|
||||
let scrollContainerRef: HTMLDivElement | undefined
|
||||
|
||||
const params = useParams()
|
||||
const [autoselect, setAutoselect] = createSignal(!params.dir)
|
||||
const globalSDK = useGlobalSDK()
|
||||
const globalSync = useGlobalSync()
|
||||
const layout = useLayout()
|
||||
@@ -116,31 +117,27 @@ export default function Layout(props: ParentProps) {
|
||||
}
|
||||
const colorSchemeLabel = (scheme: ColorScheme) => language.t(colorSchemeKey[scheme])
|
||||
|
||||
const [state, setState] = createStore({
|
||||
autoselect: !params.dir,
|
||||
busyWorkspaces: new Set<string>(),
|
||||
hoverSession: undefined as string | undefined,
|
||||
hoverProject: undefined as string | undefined,
|
||||
scrollSessionKey: undefined as string | undefined,
|
||||
nav: undefined as HTMLElement | undefined,
|
||||
})
|
||||
|
||||
const [editor, setEditor] = createStore({
|
||||
active: "" as string,
|
||||
value: "",
|
||||
})
|
||||
const [busyWorkspaces, setBusyWorkspaces] = createSignal<Set<string>>(new Set())
|
||||
const setBusy = (directory: string, value: boolean) => {
|
||||
const key = workspaceKey(directory)
|
||||
setState("busyWorkspaces", (prev) => {
|
||||
setBusyWorkspaces((prev) => {
|
||||
const next = new Set(prev)
|
||||
if (value) next.add(key)
|
||||
else next.delete(key)
|
||||
return next
|
||||
})
|
||||
}
|
||||
const isBusy = (directory: string) => state.busyWorkspaces.has(workspaceKey(directory))
|
||||
const isBusy = (directory: string) => busyWorkspaces().has(workspaceKey(directory))
|
||||
const editorRef = { current: undefined as HTMLInputElement | undefined }
|
||||
|
||||
const [hoverSession, setHoverSession] = createSignal<string | undefined>()
|
||||
const [hoverProject, setHoverProject] = createSignal<string | undefined>()
|
||||
|
||||
const [nav, setNav] = createSignal<HTMLElement | undefined>(undefined)
|
||||
const navLeave = { current: undefined as number | undefined }
|
||||
|
||||
onCleanup(() => {
|
||||
@@ -148,18 +145,18 @@ export default function Layout(props: ParentProps) {
|
||||
clearTimeout(navLeave.current)
|
||||
})
|
||||
|
||||
const sidebarHovering = createMemo(() => !layout.sidebar.opened() && state.hoverProject !== undefined)
|
||||
const sidebarHovering = createMemo(() => !layout.sidebar.opened() && hoverProject() !== undefined)
|
||||
const sidebarExpanded = createMemo(() => layout.sidebar.opened() || sidebarHovering())
|
||||
|
||||
const hoverProjectData = createMemo(() => {
|
||||
const id = state.hoverProject
|
||||
const id = hoverProject()
|
||||
if (!id) return
|
||||
return layout.projects.list().find((project) => project.worktree === id)
|
||||
})
|
||||
|
||||
createEffect(() => {
|
||||
if (!layout.sidebar.opened()) return
|
||||
setState("hoverProject", undefined)
|
||||
setHoverProject(undefined)
|
||||
})
|
||||
|
||||
createEffect(
|
||||
@@ -167,9 +164,9 @@ export default function Layout(props: ParentProps) {
|
||||
() => ({ dir: params.dir, id: params.id }),
|
||||
() => {
|
||||
if (layout.sidebar.opened()) return
|
||||
if (!state.hoverProject) return
|
||||
setState("hoverSession", undefined)
|
||||
setState("hoverProject", undefined)
|
||||
if (!hoverProject()) return
|
||||
setHoverSession(undefined)
|
||||
setHoverProject(undefined)
|
||||
},
|
||||
{ defer: true },
|
||||
),
|
||||
@@ -178,7 +175,7 @@ export default function Layout(props: ParentProps) {
|
||||
const autoselecting = createMemo(() => {
|
||||
if (params.dir) return false
|
||||
if (initialDir) return false
|
||||
if (!state.autoselect) return false
|
||||
if (!autoselect()) return false
|
||||
if (!pageReady()) return true
|
||||
if (!layoutReady()) return true
|
||||
const list = layout.projects.list()
|
||||
@@ -486,18 +483,20 @@ export default function Layout(props: ParentProps) {
|
||||
}
|
||||
}
|
||||
|
||||
const [scrollSessionKey, setScrollSessionKey] = createSignal<string | undefined>(undefined)
|
||||
|
||||
function scrollToSession(sessionId: string, sessionKey: string) {
|
||||
if (!scrollContainerRef) return
|
||||
if (state.scrollSessionKey === sessionKey) return
|
||||
if (scrollSessionKey() === sessionKey) return
|
||||
const element = scrollContainerRef.querySelector(`[data-session-id="${sessionId}"]`)
|
||||
if (!element) return
|
||||
const containerRect = scrollContainerRef.getBoundingClientRect()
|
||||
const elementRect = element.getBoundingClientRect()
|
||||
if (elementRect.top >= containerRect.top && elementRect.bottom <= containerRect.bottom) {
|
||||
setState("scrollSessionKey", sessionKey)
|
||||
setScrollSessionKey(sessionKey)
|
||||
return
|
||||
}
|
||||
setState("scrollSessionKey", sessionKey)
|
||||
setScrollSessionKey(sessionKey)
|
||||
element.scrollIntoView({ block: "nearest", behavior: "smooth" })
|
||||
}
|
||||
|
||||
@@ -545,7 +544,7 @@ export default function Layout(props: ParentProps) {
|
||||
(value) => {
|
||||
if (!value.ready) return
|
||||
if (!value.layoutReady) return
|
||||
if (!state.autoselect) return
|
||||
if (!autoselect()) return
|
||||
if (initialDir) return
|
||||
if (value.dir) return
|
||||
if (value.list.length === 0) return
|
||||
@@ -553,7 +552,7 @@ export default function Layout(props: ParentProps) {
|
||||
const last = server.projects.last()
|
||||
const next = value.list.find((project) => project.worktree === last) ?? value.list[0]
|
||||
if (!next) return
|
||||
setState("autoselect", false)
|
||||
setAutoselect(false)
|
||||
openProject(next.worktree, false)
|
||||
navigateToProject(next.worktree)
|
||||
},
|
||||
@@ -1067,8 +1066,8 @@ export default function Layout(props: ParentProps) {
|
||||
function navigateToProject(directory: string | undefined) {
|
||||
if (!directory) return
|
||||
if (!layout.sidebar.opened()) {
|
||||
setState("hoverSession", undefined)
|
||||
setState("hoverProject", undefined)
|
||||
setHoverSession(undefined)
|
||||
setHoverProject(undefined)
|
||||
}
|
||||
server.projects.touch(directory)
|
||||
const lastSession = store.lastSession[directory]
|
||||
@@ -1079,8 +1078,8 @@ export default function Layout(props: ParentProps) {
|
||||
function navigateToSession(session: Session | undefined) {
|
||||
if (!session) return
|
||||
if (!layout.sidebar.opened()) {
|
||||
setState("hoverSession", undefined)
|
||||
setState("hoverProject", undefined)
|
||||
setHoverSession(undefined)
|
||||
setHoverProject(undefined)
|
||||
}
|
||||
navigate(`/${base64Encode(session.directory)}/session/${session.id}`)
|
||||
layout.mobileSidebar.hide()
|
||||
@@ -1443,11 +1442,6 @@ export default function Layout(props: ParentProps) {
|
||||
),
|
||||
)
|
||||
|
||||
createEffect(() => {
|
||||
const sidebarWidth = layout.sidebar.opened() ? layout.sidebar.width() : 48
|
||||
document.documentElement.style.setProperty("--dialog-left-margin", `${sidebarWidth}px`)
|
||||
})
|
||||
|
||||
createEffect(() => {
|
||||
const project = currentProject()
|
||||
if (!project) return
|
||||
@@ -1478,7 +1472,7 @@ export default function Layout(props: ParentProps) {
|
||||
function handleDragStart(event: unknown) {
|
||||
const id = getDraggableId(event)
|
||||
if (!id) return
|
||||
setState("hoverProject", undefined)
|
||||
setHoverProject(undefined)
|
||||
setStore("activeProject", id)
|
||||
}
|
||||
|
||||
@@ -1597,7 +1591,6 @@ export default function Layout(props: ParentProps) {
|
||||
mobile?: boolean
|
||||
dense?: boolean
|
||||
popover?: boolean
|
||||
children?: Map<string, string[]>
|
||||
}): JSX.Element => {
|
||||
const notification = useNotification()
|
||||
const notifications = createMemo(() => notification.session.unseen(props.session.id))
|
||||
@@ -1606,16 +1599,6 @@ export default function Layout(props: ParentProps) {
|
||||
const hasPermissions = createMemo(() => {
|
||||
const permissions = sessionStore.permission?.[props.session.id] ?? []
|
||||
if (permissions.length > 0) return true
|
||||
|
||||
const childIDs = props.children?.get(props.session.id)
|
||||
if (childIDs) {
|
||||
for (const id of childIDs) {
|
||||
const childPermissions = sessionStore.permission?.[id] ?? []
|
||||
if (childPermissions.length > 0) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const childSessions = sessionStore.session.filter((s) => s.parentID === props.session.id)
|
||||
for (const child of childSessions) {
|
||||
const childPermissions = sessionStore.permission?.[child.id] ?? []
|
||||
@@ -1649,10 +1632,8 @@ export default function Layout(props: ParentProps) {
|
||||
const hoverAllowed = createMemo(() => !props.mobile && sidebarExpanded())
|
||||
const hoverEnabled = createMemo(() => (props.popover ?? true) && hoverAllowed())
|
||||
const isActive = createMemo(() => props.session.id === params.id)
|
||||
const [menu, setMenu] = createStore({
|
||||
open: false,
|
||||
pendingRename: false,
|
||||
})
|
||||
const [menuOpen, setMenuOpen] = createSignal(false)
|
||||
const [pendingRename, setPendingRename] = createSignal(false)
|
||||
|
||||
const messageLabel = (message: Message) => {
|
||||
const parts = sessionStore.part[message.id] ?? []
|
||||
@@ -1663,13 +1644,13 @@ export default function Layout(props: ParentProps) {
|
||||
const item = (
|
||||
<A
|
||||
href={`${props.slug}/session/${props.session.id}`}
|
||||
class={`flex items-center justify-between gap-3 min-w-0 text-left w-full focus:outline-none transition-[padding] ${menu.open ? "pr-7" : ""} group-hover/session:pr-7 group-focus-within/session:pr-7 group-active/session:pr-7 ${props.dense ? "py-0.5" : "py-1"}`}
|
||||
class={`flex items-center justify-between gap-3 min-w-0 text-left w-full focus:outline-none transition-[padding] ${menuOpen() ? "pr-7" : ""} group-hover/session:pr-7 group-focus-within/session:pr-7 group-active/session:pr-7 ${props.dense ? "py-0.5" : "py-1"}`}
|
||||
onMouseEnter={() => prefetchSession(props.session, "high")}
|
||||
onFocus={() => prefetchSession(props.session, "high")}
|
||||
onClick={() => {
|
||||
setState("hoverSession", undefined)
|
||||
setHoverSession(undefined)
|
||||
if (layout.sidebar.opened()) return
|
||||
queueMicrotask(() => setState("hoverProject", undefined))
|
||||
queueMicrotask(() => setHoverProject(undefined))
|
||||
}}
|
||||
>
|
||||
<div class="flex items-center gap-1 w-full">
|
||||
@@ -1732,9 +1713,9 @@ export default function Layout(props: ParentProps) {
|
||||
gutter={16}
|
||||
shift={-2}
|
||||
trigger={item}
|
||||
mount={!props.mobile ? state.nav : undefined}
|
||||
open={state.hoverSession === props.session.id}
|
||||
onOpenChange={(open) => setState("hoverSession", open ? props.session.id : undefined)}
|
||||
mount={!props.mobile ? nav() : undefined}
|
||||
open={hoverSession() === props.session.id}
|
||||
onOpenChange={(open) => setHoverSession(open ? props.session.id : undefined)}
|
||||
>
|
||||
<Show
|
||||
when={hoverReady()}
|
||||
@@ -1764,13 +1745,13 @@ export default function Layout(props: ParentProps) {
|
||||
<div
|
||||
class={`absolute ${props.dense ? "top-0.5 right-0.5" : "top-1 right-1"} flex items-center gap-0.5 transition-opacity`}
|
||||
classList={{
|
||||
"opacity-100 pointer-events-auto": menu.open,
|
||||
"opacity-0 pointer-events-none": !menu.open,
|
||||
"opacity-100 pointer-events-auto": menuOpen(),
|
||||
"opacity-0 pointer-events-none": !menuOpen(),
|
||||
"group-hover/session:opacity-100 group-hover/session:pointer-events-auto": true,
|
||||
"group-focus-within/session:opacity-100 group-focus-within/session:pointer-events-auto": true,
|
||||
}}
|
||||
>
|
||||
<DropdownMenu modal={!sidebarHovering()} open={menu.open} onOpenChange={(open) => setMenu("open", open)}>
|
||||
<DropdownMenu modal={!sidebarHovering()} open={menuOpen()} onOpenChange={setMenuOpen}>
|
||||
<Tooltip value={language.t("common.moreOptions")} placement="top">
|
||||
<DropdownMenu.Trigger
|
||||
as={IconButton}
|
||||
@@ -1780,19 +1761,19 @@ export default function Layout(props: ParentProps) {
|
||||
aria-label={language.t("common.moreOptions")}
|
||||
/>
|
||||
</Tooltip>
|
||||
<DropdownMenu.Portal mount={!props.mobile ? state.nav : undefined}>
|
||||
<DropdownMenu.Portal mount={!props.mobile ? nav() : undefined}>
|
||||
<DropdownMenu.Content
|
||||
onCloseAutoFocus={(event) => {
|
||||
if (!menu.pendingRename) return
|
||||
if (!pendingRename()) return
|
||||
event.preventDefault()
|
||||
setMenu("pendingRename", false)
|
||||
setPendingRename(false)
|
||||
openEditor(`session:${props.session.id}`, props.session.title)
|
||||
}}
|
||||
>
|
||||
<DropdownMenu.Item
|
||||
onSelect={() => {
|
||||
setMenu("pendingRename", true)
|
||||
setMenu("open", false)
|
||||
setPendingRename(true)
|
||||
setMenuOpen(false)
|
||||
}}
|
||||
>
|
||||
<DropdownMenu.ItemLabel>{language.t("common.rename")}</DropdownMenu.ItemLabel>
|
||||
@@ -1821,9 +1802,9 @@ export default function Layout(props: ParentProps) {
|
||||
end
|
||||
class={`flex items-center justify-between gap-3 min-w-0 text-left w-full focus:outline-none ${props.dense ? "py-0.5" : "py-1"}`}
|
||||
onClick={() => {
|
||||
setState("hoverSession", undefined)
|
||||
setHoverSession(undefined)
|
||||
if (layout.sidebar.opened()) return
|
||||
queueMicrotask(() => setState("hoverProject", undefined))
|
||||
queueMicrotask(() => setHoverProject(undefined))
|
||||
}}
|
||||
>
|
||||
<div class="flex items-center gap-1 w-full">
|
||||
@@ -1903,10 +1884,8 @@ export default function Layout(props: ParentProps) {
|
||||
const SortableWorkspace = (props: { directory: string; project: LocalProject; mobile?: boolean }): JSX.Element => {
|
||||
const sortable = createSortable(props.directory)
|
||||
const [workspaceStore, setWorkspaceStore] = globalSync.child(props.directory, { bootstrap: false })
|
||||
const [menu, setMenu] = createStore({
|
||||
open: false,
|
||||
pendingRename: false,
|
||||
})
|
||||
const [menuOpen, setMenuOpen] = createSignal(false)
|
||||
const [pendingRename, setPendingRename] = createSignal(false)
|
||||
const slug = createMemo(() => base64Encode(props.directory))
|
||||
const sessions = createMemo(() =>
|
||||
workspaceStore.session
|
||||
@@ -1914,19 +1893,6 @@ export default function Layout(props: ParentProps) {
|
||||
.filter((session) => !session.parentID && !session.time?.archived)
|
||||
.toSorted(sortSessions(Date.now())),
|
||||
)
|
||||
const children = createMemo(() => {
|
||||
const map = new Map<string, string[]>()
|
||||
for (const session of workspaceStore.session) {
|
||||
if (!session.parentID) continue
|
||||
const existing = map.get(session.parentID)
|
||||
if (existing) {
|
||||
existing.push(session.id)
|
||||
continue
|
||||
}
|
||||
map.set(session.parentID, [session.id])
|
||||
}
|
||||
return map
|
||||
})
|
||||
const local = createMemo(() => props.directory === props.project.worktree)
|
||||
const active = createMemo(() => {
|
||||
const current = params.dir ? base64Decode(params.dir) : ""
|
||||
@@ -1940,9 +1906,10 @@ export default function Layout(props: ParentProps) {
|
||||
const open = createMemo(() => store.workspaceExpanded[props.directory] ?? local())
|
||||
const boot = createMemo(() => open() || active())
|
||||
const loading = createMemo(() => open() && workspaceStore.status !== "complete" && sessions().length === 0)
|
||||
const hasMore = createMemo(() => workspaceStore.sessionTotal > sessions().length)
|
||||
const hasMore = createMemo(() => local() && workspaceStore.sessionTotal > workspaceStore.session.length)
|
||||
const busy = createMemo(() => isBusy(props.directory))
|
||||
const loadMore = async () => {
|
||||
if (!local()) return
|
||||
setWorkspaceStore("limit", (limit) => limit + 5)
|
||||
await globalSync.project.loadSessions(props.directory)
|
||||
}
|
||||
@@ -2028,17 +1995,13 @@ export default function Layout(props: ParentProps) {
|
||||
<div
|
||||
class="absolute right-1 top-1/2 -translate-y-1/2 flex items-center gap-0.5 transition-opacity"
|
||||
classList={{
|
||||
"opacity-100 pointer-events-auto": menu.open,
|
||||
"opacity-0 pointer-events-none": !menu.open,
|
||||
"opacity-100 pointer-events-auto": menuOpen(),
|
||||
"opacity-0 pointer-events-none": !menuOpen(),
|
||||
"group-hover/workspace:opacity-100 group-hover/workspace:pointer-events-auto": true,
|
||||
"group-focus-within/workspace:opacity-100 group-focus-within/workspace:pointer-events-auto": true,
|
||||
}}
|
||||
>
|
||||
<DropdownMenu
|
||||
modal={!sidebarHovering()}
|
||||
open={menu.open}
|
||||
onOpenChange={(open) => setMenu("open", open)}
|
||||
>
|
||||
<DropdownMenu modal={!sidebarHovering()} open={menuOpen()} onOpenChange={setMenuOpen}>
|
||||
<Tooltip value={language.t("common.moreOptions")} placement="top">
|
||||
<DropdownMenu.Trigger
|
||||
as={IconButton}
|
||||
@@ -2048,20 +2011,20 @@ export default function Layout(props: ParentProps) {
|
||||
aria-label={language.t("common.moreOptions")}
|
||||
/>
|
||||
</Tooltip>
|
||||
<DropdownMenu.Portal mount={!props.mobile ? state.nav : undefined}>
|
||||
<DropdownMenu.Portal mount={!props.mobile ? nav() : undefined}>
|
||||
<DropdownMenu.Content
|
||||
onCloseAutoFocus={(event) => {
|
||||
if (!menu.pendingRename) return
|
||||
if (!pendingRename()) return
|
||||
event.preventDefault()
|
||||
setMenu("pendingRename", false)
|
||||
setPendingRename(false)
|
||||
openEditor(`workspace:${props.directory}`, workspaceValue())
|
||||
}}
|
||||
>
|
||||
<DropdownMenu.Item
|
||||
disabled={local()}
|
||||
onSelect={() => {
|
||||
setMenu("pendingRename", true)
|
||||
setMenu("open", false)
|
||||
setPendingRename(true)
|
||||
setMenuOpen(false)
|
||||
}}
|
||||
>
|
||||
<DropdownMenu.ItemLabel>{language.t("common.rename")}</DropdownMenu.ItemLabel>
|
||||
@@ -2101,9 +2064,7 @@ export default function Layout(props: ParentProps) {
|
||||
<SessionSkeleton />
|
||||
</Show>
|
||||
<For each={sessions()}>
|
||||
{(session) => (
|
||||
<SessionItem session={session} slug={slug()} mobile={props.mobile} children={children()} />
|
||||
)}
|
||||
{(session) => <SessionItem session={session} slug={slug()} mobile={props.mobile} />}
|
||||
</For>
|
||||
<Show when={hasMore()}>
|
||||
<div class="relative w-full py-1">
|
||||
@@ -2142,7 +2103,7 @@ export default function Layout(props: ParentProps) {
|
||||
|
||||
const preview = createMemo(() => !props.mobile && layout.sidebar.opened())
|
||||
const overlay = createMemo(() => !props.mobile && !layout.sidebar.opened())
|
||||
const active = createMemo(() => (preview() ? open() : overlay() && state.hoverProject === props.project.worktree))
|
||||
const active = createMemo(() => (preview() ? open() : overlay() && hoverProject() === props.project.worktree))
|
||||
|
||||
createEffect(() => {
|
||||
if (preview()) return
|
||||
@@ -2194,14 +2155,14 @@ export default function Layout(props: ParentProps) {
|
||||
onMouseEnter={() => {
|
||||
if (!overlay()) return
|
||||
globalSync.child(props.project.worktree)
|
||||
setState("hoverProject", props.project.worktree)
|
||||
setState("hoverSession", undefined)
|
||||
setHoverProject(props.project.worktree)
|
||||
setHoverSession(undefined)
|
||||
}}
|
||||
onFocus={() => {
|
||||
if (!overlay()) return
|
||||
globalSync.child(props.project.worktree)
|
||||
setState("hoverProject", props.project.worktree)
|
||||
setState("hoverSession", undefined)
|
||||
setHoverProject(props.project.worktree)
|
||||
setHoverSession(undefined)
|
||||
}}
|
||||
onClick={() => navigateToProject(props.project.worktree)}
|
||||
onBlur={() => setOpen(false)}
|
||||
@@ -2223,7 +2184,7 @@ export default function Layout(props: ParentProps) {
|
||||
trigger={trigger}
|
||||
onOpenChange={(value) => {
|
||||
setOpen(value)
|
||||
if (value) setState("hoverSession", undefined)
|
||||
if (value) setHoverSession(undefined)
|
||||
}}
|
||||
>
|
||||
<div class="-m-3 p-2 flex flex-col w-72">
|
||||
@@ -2318,21 +2279,8 @@ export default function Layout(props: ParentProps) {
|
||||
.filter((session) => !session.parentID && !session.time?.archived)
|
||||
.toSorted(sortSessions(Date.now())),
|
||||
)
|
||||
const children = createMemo(() => {
|
||||
const map = new Map<string, string[]>()
|
||||
for (const session of workspaceStore.session) {
|
||||
if (!session.parentID) continue
|
||||
const existing = map.get(session.parentID)
|
||||
if (existing) {
|
||||
existing.push(session.id)
|
||||
continue
|
||||
}
|
||||
map.set(session.parentID, [session.id])
|
||||
}
|
||||
return map
|
||||
})
|
||||
const loading = createMemo(() => workspaceStore.status !== "complete" && sessions().length === 0)
|
||||
const hasMore = createMemo(() => workspaceStore.sessionTotal > sessions().length)
|
||||
const hasMore = createMemo(() => workspaceStore.sessionTotal > workspaceStore.session.length)
|
||||
const loadMore = async () => {
|
||||
setWorkspaceStore("limit", (limit) => limit + 5)
|
||||
await globalSync.project.loadSessions(props.project.worktree)
|
||||
@@ -2351,7 +2299,7 @@ export default function Layout(props: ParentProps) {
|
||||
<SessionSkeleton />
|
||||
</Show>
|
||||
<For each={sessions()}>
|
||||
{(session) => <SessionItem session={session} slug={slug()} mobile={props.mobile} children={children()} />}
|
||||
{(session) => <SessionItem session={session} slug={slug()} mobile={props.mobile} />}
|
||||
</For>
|
||||
<Show when={hasMore()}>
|
||||
<div class="relative w-full py-1">
|
||||
@@ -2375,8 +2323,8 @@ export default function Layout(props: ParentProps) {
|
||||
|
||||
const createWorkspace = async (project: LocalProject) => {
|
||||
if (!layout.sidebar.opened()) {
|
||||
setState("hoverSession", undefined)
|
||||
setState("hoverProject", undefined)
|
||||
setHoverSession(undefined)
|
||||
setHoverProject(undefined)
|
||||
}
|
||||
const created = await globalSDK.client.worktree
|
||||
.create({ directory: project.worktree })
|
||||
@@ -2479,7 +2427,7 @@ export default function Layout(props: ParentProps) {
|
||||
class="shrink-0 size-6 rounded-md opacity-0 group-hover/project:opacity-100 data-[expanded]:opacity-100 data-[expanded]:bg-surface-base-active"
|
||||
aria-label={language.t("common.moreOptions")}
|
||||
/>
|
||||
<DropdownMenu.Portal mount={!panelProps.mobile ? state.nav : undefined}>
|
||||
<DropdownMenu.Portal mount={!panelProps.mobile ? nav() : undefined}>
|
||||
<DropdownMenu.Content class="mt-1">
|
||||
<DropdownMenu.Item onSelect={() => dialog.show(() => <DialogEditProject project={p} />)}>
|
||||
<DropdownMenu.ItemLabel>{language.t("common.edit")}</DropdownMenu.ItemLabel>
|
||||
@@ -2528,8 +2476,8 @@ export default function Layout(props: ParentProps) {
|
||||
class="w-full"
|
||||
onClick={() => {
|
||||
if (!layout.sidebar.opened()) {
|
||||
setState("hoverSession", undefined)
|
||||
setState("hoverProject", undefined)
|
||||
setHoverSession(undefined)
|
||||
setHoverProject(undefined)
|
||||
}
|
||||
navigate(`/${base64Encode(p.worktree)}/session`)
|
||||
layout.mobileSidebar.hide()
|
||||
@@ -2720,7 +2668,7 @@ export default function Layout(props: ParentProps) {
|
||||
}}
|
||||
style={{ width: layout.sidebar.opened() ? `${Math.max(layout.sidebar.width(), 244)}px` : "64px" }}
|
||||
ref={(el) => {
|
||||
setState("nav", el)
|
||||
setNav(el)
|
||||
}}
|
||||
onMouseEnter={() => {
|
||||
if (navLeave.current === undefined) return
|
||||
@@ -2733,8 +2681,8 @@ export default function Layout(props: ParentProps) {
|
||||
if (navLeave.current !== undefined) clearTimeout(navLeave.current)
|
||||
navLeave.current = window.setTimeout(() => {
|
||||
navLeave.current = undefined
|
||||
setState("hoverProject", undefined)
|
||||
setState("hoverSession", undefined)
|
||||
setHoverProject(undefined)
|
||||
setHoverSession(undefined)
|
||||
}, 300)
|
||||
}}
|
||||
>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,4 @@
|
||||
import { onCleanup } from "solid-js"
|
||||
import { createStore } from "solid-js/store"
|
||||
import { createSignal, onCleanup } from "solid-js"
|
||||
|
||||
// Minimal types to avoid relying on non-standard DOM typings
|
||||
type RecognitionResult = {
|
||||
@@ -60,15 +59,9 @@ export function createSpeechRecognition(opts?: {
|
||||
typeof window !== "undefined" &&
|
||||
Boolean((window as any).webkitSpeechRecognition || (window as any).SpeechRecognition)
|
||||
|
||||
const [store, setStore] = createStore({
|
||||
isRecording: false,
|
||||
committed: "",
|
||||
interim: "",
|
||||
})
|
||||
|
||||
const isRecording = () => store.isRecording
|
||||
const committed = () => store.committed
|
||||
const interim = () => store.interim
|
||||
const [isRecording, setIsRecording] = createSignal(false)
|
||||
const [committed, setCommitted] = createSignal("")
|
||||
const [interim, setInterim] = createSignal("")
|
||||
|
||||
let recognition: Recognition | undefined
|
||||
let shouldContinue = false
|
||||
@@ -89,7 +82,7 @@ export function createSpeechRecognition(opts?: {
|
||||
const nextCommitted = appendSegment(committedText, segment)
|
||||
if (nextCommitted === committedText) return
|
||||
committedText = nextCommitted
|
||||
setStore("committed", committedText)
|
||||
setCommitted(committedText)
|
||||
if (opts?.onFinal) opts.onFinal(segment.trim())
|
||||
}
|
||||
|
||||
@@ -105,7 +98,7 @@ export function createSpeechRecognition(opts?: {
|
||||
pendingHypothesis = ""
|
||||
lastInterimSuffix = ""
|
||||
shrinkCandidate = undefined
|
||||
setStore("interim", "")
|
||||
setInterim("")
|
||||
if (opts?.onInterim) opts.onInterim("")
|
||||
}
|
||||
|
||||
@@ -114,7 +107,7 @@ export function createSpeechRecognition(opts?: {
|
||||
pendingHypothesis = hypothesis
|
||||
lastInterimSuffix = suffix
|
||||
shrinkCandidate = undefined
|
||||
setStore("interim", suffix)
|
||||
setInterim(suffix)
|
||||
if (opts?.onInterim) {
|
||||
opts.onInterim(suffix ? appendSegment(committedText, suffix) : "")
|
||||
}
|
||||
@@ -129,7 +122,7 @@ export function createSpeechRecognition(opts?: {
|
||||
pendingHypothesis = ""
|
||||
lastInterimSuffix = ""
|
||||
shrinkCandidate = undefined
|
||||
setStore("interim", "")
|
||||
setInterim("")
|
||||
if (opts?.onInterim) opts.onInterim("")
|
||||
}, COMMIT_DELAY)
|
||||
}
|
||||
@@ -169,7 +162,7 @@ export function createSpeechRecognition(opts?: {
|
||||
pendingHypothesis = ""
|
||||
lastInterimSuffix = ""
|
||||
shrinkCandidate = undefined
|
||||
setStore("interim", "")
|
||||
setInterim("")
|
||||
if (opts?.onInterim) opts.onInterim("")
|
||||
return
|
||||
}
|
||||
@@ -218,7 +211,7 @@ export function createSpeechRecognition(opts?: {
|
||||
lastInterimSuffix = ""
|
||||
shrinkCandidate = undefined
|
||||
if (e.error === "no-speech" && shouldContinue) {
|
||||
setStore("interim", "")
|
||||
setInterim("")
|
||||
if (opts?.onInterim) opts.onInterim("")
|
||||
setTimeout(() => {
|
||||
try {
|
||||
@@ -228,7 +221,7 @@ export function createSpeechRecognition(opts?: {
|
||||
return
|
||||
}
|
||||
shouldContinue = false
|
||||
setStore("isRecording", false)
|
||||
setIsRecording(false)
|
||||
}
|
||||
|
||||
recognition.onstart = () => {
|
||||
@@ -237,16 +230,16 @@ export function createSpeechRecognition(opts?: {
|
||||
cancelPendingCommit()
|
||||
lastInterimSuffix = ""
|
||||
shrinkCandidate = undefined
|
||||
setStore("interim", "")
|
||||
setInterim("")
|
||||
if (opts?.onInterim) opts.onInterim("")
|
||||
setStore("isRecording", true)
|
||||
setIsRecording(true)
|
||||
}
|
||||
|
||||
recognition.onend = () => {
|
||||
cancelPendingCommit()
|
||||
lastInterimSuffix = ""
|
||||
shrinkCandidate = undefined
|
||||
setStore("isRecording", false)
|
||||
setIsRecording(false)
|
||||
if (shouldContinue) {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
@@ -265,7 +258,7 @@ export function createSpeechRecognition(opts?: {
|
||||
cancelPendingCommit()
|
||||
lastInterimSuffix = ""
|
||||
shrinkCandidate = undefined
|
||||
setStore("interim", "")
|
||||
setInterim("")
|
||||
try {
|
||||
recognition.start()
|
||||
} catch {}
|
||||
@@ -278,7 +271,7 @@ export function createSpeechRecognition(opts?: {
|
||||
cancelPendingCommit()
|
||||
lastInterimSuffix = ""
|
||||
shrinkCandidate = undefined
|
||||
setStore("interim", "")
|
||||
setInterim("")
|
||||
if (opts?.onInterim) opts.onInterim("")
|
||||
try {
|
||||
recognition.stop()
|
||||
@@ -291,7 +284,7 @@ export function createSpeechRecognition(opts?: {
|
||||
cancelPendingCommit()
|
||||
lastInterimSuffix = ""
|
||||
shrinkCandidate = undefined
|
||||
setStore("interim", "")
|
||||
setInterim("")
|
||||
if (opts?.onInterim) opts.onInterim("")
|
||||
try {
|
||||
recognition?.stop()
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
import { query } from "@solidjs/router"
|
||||
|
||||
type Release = {
|
||||
tag_name: string
|
||||
name: string
|
||||
body: string
|
||||
published_at: string
|
||||
html_url: string
|
||||
}
|
||||
|
||||
export type HighlightMedia =
|
||||
| { type: "video"; src: string }
|
||||
| { type: "image"; src: string; width: string; height: string }
|
||||
|
||||
export type HighlightItem = {
|
||||
title: string
|
||||
description: string
|
||||
shortDescription?: string
|
||||
media: HighlightMedia
|
||||
}
|
||||
|
||||
export type HighlightGroup = {
|
||||
source: string
|
||||
items: HighlightItem[]
|
||||
}
|
||||
|
||||
export type ChangelogRelease = {
|
||||
tag: string
|
||||
name: string
|
||||
date: string
|
||||
url: string
|
||||
highlights: HighlightGroup[]
|
||||
sections: { title: string; items: string[] }[]
|
||||
}
|
||||
|
||||
export type ChangelogData = {
|
||||
ok: boolean
|
||||
releases: ChangelogRelease[]
|
||||
}
|
||||
|
||||
export async function loadChangelog(): Promise<ChangelogData> {
|
||||
const response = await fetch("https://api.github.com/repos/anomalyco/opencode/releases?per_page=20", {
|
||||
headers: {
|
||||
Accept: "application/vnd.github.v3+json",
|
||||
"User-Agent": "OpenCode-Console",
|
||||
},
|
||||
cf: {
|
||||
// best-effort edge caching (ignored outside Cloudflare)
|
||||
cacheTtl: 60 * 5,
|
||||
cacheEverything: true,
|
||||
},
|
||||
} as RequestInit).catch(() => undefined)
|
||||
|
||||
if (!response?.ok) return { ok: false, releases: [] }
|
||||
|
||||
const data = await response.json().catch(() => undefined)
|
||||
if (!Array.isArray(data)) return { ok: false, releases: [] }
|
||||
|
||||
const releases = (data as Release[]).map((release) => {
|
||||
const parsed = parseMarkdown(release.body || "")
|
||||
return {
|
||||
tag: release.tag_name,
|
||||
name: release.name,
|
||||
date: release.published_at,
|
||||
url: release.html_url,
|
||||
highlights: parsed.highlights,
|
||||
sections: parsed.sections,
|
||||
}
|
||||
})
|
||||
|
||||
return { ok: true, releases }
|
||||
}
|
||||
|
||||
export const changelog = query(async () => {
|
||||
"use server"
|
||||
const result = await loadChangelog()
|
||||
return result.releases
|
||||
}, "changelog")
|
||||
|
||||
function parseHighlights(body: string): HighlightGroup[] {
|
||||
const groups = new Map<string, HighlightItem[]>()
|
||||
const regex = /<highlight\s+source="([^"]+)">([\s\S]*?)<\/highlight>/g
|
||||
let match
|
||||
|
||||
while ((match = regex.exec(body)) !== null) {
|
||||
const source = match[1]
|
||||
const content = match[2]
|
||||
|
||||
const titleMatch = content.match(/<h2>([^<]+)<\/h2>/)
|
||||
const pMatch = content.match(/<p(?:\s+short="([^"]*)")?>([^<]+)<\/p>/)
|
||||
const imgMatch = content.match(/<img\s+width="([^"]+)"\s+height="([^"]+)"\s+alt="[^"]*"\s+src="([^"]+)"/)
|
||||
const videoMatch = content.match(/^\s*(https:\/\/github\.com\/user-attachments\/assets\/[a-f0-9-]+)\s*$/m)
|
||||
|
||||
const media = (() => {
|
||||
if (videoMatch) return { type: "video", src: videoMatch[1] } satisfies HighlightMedia
|
||||
if (imgMatch) {
|
||||
return {
|
||||
type: "image",
|
||||
src: imgMatch[3],
|
||||
width: imgMatch[1],
|
||||
height: imgMatch[2],
|
||||
} satisfies HighlightMedia
|
||||
}
|
||||
})()
|
||||
|
||||
if (!titleMatch || !media) continue
|
||||
|
||||
const item: HighlightItem = {
|
||||
title: titleMatch[1],
|
||||
description: pMatch?.[2] || "",
|
||||
shortDescription: pMatch?.[1],
|
||||
media,
|
||||
}
|
||||
|
||||
if (!groups.has(source)) groups.set(source, [])
|
||||
groups.get(source)!.push(item)
|
||||
}
|
||||
|
||||
return Array.from(groups.entries()).map(([source, items]) => ({ source, items }))
|
||||
}
|
||||
|
||||
function parseMarkdown(body: string) {
|
||||
const lines = body.split("\n")
|
||||
const sections: { title: string; items: string[] }[] = []
|
||||
let current: { title: string; items: string[] } | null = null
|
||||
let skip = false
|
||||
|
||||
for (const line of lines) {
|
||||
if (line.startsWith("## ")) {
|
||||
if (current) sections.push(current)
|
||||
current = { title: line.slice(3).trim(), items: [] }
|
||||
skip = false
|
||||
continue
|
||||
}
|
||||
|
||||
if (line.startsWith("**Thank you")) {
|
||||
skip = true
|
||||
continue
|
||||
}
|
||||
|
||||
if (line.startsWith("- ") && !skip) current?.items.push(line.slice(2).trim())
|
||||
}
|
||||
|
||||
if (current) sections.push(current)
|
||||
return { sections, highlights: parseHighlights(body) }
|
||||
}
|
||||
@@ -1,30 +1,140 @@
|
||||
import { loadChangelog } from "~/lib/changelog"
|
||||
type Release = {
|
||||
tag_name: string
|
||||
name: string
|
||||
body: string
|
||||
published_at: string
|
||||
html_url: string
|
||||
}
|
||||
|
||||
const cors = {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Access-Control-Allow-Methods": "GET, OPTIONS",
|
||||
"Access-Control-Allow-Headers": "Content-Type, Authorization",
|
||||
type HighlightMedia = { type: "video"; src: string } | { type: "image"; src: string; width: string; height: string }
|
||||
|
||||
type HighlightItem = {
|
||||
title: string
|
||||
description: string
|
||||
shortDescription?: string
|
||||
media: HighlightMedia
|
||||
}
|
||||
|
||||
type HighlightGroup = {
|
||||
source: string
|
||||
items: HighlightItem[]
|
||||
}
|
||||
|
||||
const ok = "public, max-age=1, s-maxage=300, stale-while-revalidate=86400, stale-if-error=86400"
|
||||
const error = "public, max-age=1, s-maxage=60, stale-while-revalidate=600, stale-if-error=86400"
|
||||
|
||||
function parseHighlights(body: string): HighlightGroup[] {
|
||||
const groups = new Map<string, HighlightItem[]>()
|
||||
const regex = /<highlight\s+source="([^"]+)">([\s\S]*?)<\/highlight>/g
|
||||
let match
|
||||
|
||||
while ((match = regex.exec(body)) !== null) {
|
||||
const source = match[1]
|
||||
const content = match[2]
|
||||
|
||||
const titleMatch = content.match(/<h2>([^<]+)<\/h2>/)
|
||||
const pMatch = content.match(/<p(?:\s+short="([^"]*)")?>([^<]+)<\/p>/)
|
||||
const imgMatch = content.match(/<img\s+width="([^"]+)"\s+height="([^"]+)"\s+alt="[^"]*"\s+src="([^"]+)"/)
|
||||
const videoMatch = content.match(/^\s*(https:\/\/github\.com\/user-attachments\/assets\/[a-f0-9-]+)\s*$/m)
|
||||
|
||||
let media: HighlightMedia | undefined
|
||||
if (videoMatch) {
|
||||
media = { type: "video", src: videoMatch[1] }
|
||||
} else if (imgMatch) {
|
||||
media = { type: "image", src: imgMatch[3], width: imgMatch[1], height: imgMatch[2] }
|
||||
}
|
||||
|
||||
if (titleMatch && media) {
|
||||
const item: HighlightItem = {
|
||||
title: titleMatch[1],
|
||||
description: pMatch?.[2] || "",
|
||||
shortDescription: pMatch?.[1],
|
||||
media,
|
||||
}
|
||||
|
||||
if (!groups.has(source)) {
|
||||
groups.set(source, [])
|
||||
}
|
||||
groups.get(source)!.push(item)
|
||||
}
|
||||
}
|
||||
|
||||
return Array.from(groups.entries()).map(([source, items]) => ({ source, items }))
|
||||
}
|
||||
|
||||
function parseMarkdown(body: string) {
|
||||
const lines = body.split("\n")
|
||||
const sections: { title: string; items: string[] }[] = []
|
||||
let current: { title: string; items: string[] } | null = null
|
||||
let skip = false
|
||||
|
||||
for (const line of lines) {
|
||||
if (line.startsWith("## ")) {
|
||||
if (current) sections.push(current)
|
||||
const title = line.slice(3).trim()
|
||||
current = { title, items: [] }
|
||||
skip = false
|
||||
} else if (line.startsWith("**Thank you")) {
|
||||
skip = true
|
||||
} else if (line.startsWith("- ") && !skip) {
|
||||
current?.items.push(line.slice(2).trim())
|
||||
}
|
||||
}
|
||||
if (current) sections.push(current)
|
||||
|
||||
const highlights = parseHighlights(body)
|
||||
|
||||
return { sections, highlights }
|
||||
}
|
||||
|
||||
export async function GET() {
|
||||
const result = await loadChangelog().catch(() => ({ ok: false, releases: [] }))
|
||||
|
||||
return new Response(JSON.stringify({ releases: result.releases }), {
|
||||
status: result.ok ? 200 : 503,
|
||||
const response = await fetch("https://api.github.com/repos/anomalyco/opencode/releases?per_page=20", {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Cache-Control": result.ok ? ok : error,
|
||||
...cors,
|
||||
Accept: "application/vnd.github.v3+json",
|
||||
"User-Agent": "OpenCode-Console",
|
||||
},
|
||||
})
|
||||
}
|
||||
cf: {
|
||||
// best-effort edge caching (ignored outside Cloudflare)
|
||||
cacheTtl: 60 * 5,
|
||||
cacheEverything: true,
|
||||
},
|
||||
} as any).catch(() => undefined)
|
||||
|
||||
export async function OPTIONS() {
|
||||
return new Response(null, {
|
||||
status: 200,
|
||||
headers: cors,
|
||||
})
|
||||
const fail = () =>
|
||||
new Response(JSON.stringify({ releases: [] }), {
|
||||
status: 503,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Cache-Control": error,
|
||||
},
|
||||
})
|
||||
|
||||
if (!response?.ok) return fail()
|
||||
|
||||
const data = await response.json().catch(() => undefined)
|
||||
if (!Array.isArray(data)) return fail()
|
||||
|
||||
const releases = data as Release[]
|
||||
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
releases: releases.map((release) => {
|
||||
const parsed = parseMarkdown(release.body || "")
|
||||
return {
|
||||
tag: release.tag_name,
|
||||
name: release.name,
|
||||
date: release.published_at,
|
||||
url: release.html_url,
|
||||
highlights: parsed.highlights,
|
||||
sections: parsed.sections,
|
||||
}
|
||||
}),
|
||||
}),
|
||||
{
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Cache-Control": ok,
|
||||
},
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -5,9 +5,42 @@ import { Header } from "~/component/header"
|
||||
import { Footer } from "~/component/footer"
|
||||
import { Legal } from "~/component/legal"
|
||||
import { config } from "~/config"
|
||||
import { changelog } from "~/lib/changelog"
|
||||
import type { HighlightGroup } from "~/lib/changelog"
|
||||
import { For, Show, createSignal } from "solid-js"
|
||||
import { getRequestEvent } from "solid-js/web"
|
||||
|
||||
type HighlightMedia = { type: "video"; src: string } | { type: "image"; src: string; width: string; height: string }
|
||||
|
||||
type HighlightItem = {
|
||||
title: string
|
||||
description: string
|
||||
shortDescription?: string
|
||||
media: HighlightMedia
|
||||
}
|
||||
|
||||
type HighlightGroup = {
|
||||
source: string
|
||||
items: HighlightItem[]
|
||||
}
|
||||
|
||||
type ChangelogRelease = {
|
||||
tag: string
|
||||
name: string
|
||||
date: string
|
||||
url: string
|
||||
highlights: HighlightGroup[]
|
||||
sections: { title: string; items: string[] }[]
|
||||
}
|
||||
|
||||
async function getReleases() {
|
||||
const event = getRequestEvent()
|
||||
const url = event ? new URL("/changelog.json", event.request.url).toString() : "/changelog.json"
|
||||
|
||||
const response = await fetch(url).catch(() => undefined)
|
||||
if (!response?.ok) return []
|
||||
|
||||
const json = await response.json().catch(() => undefined)
|
||||
return Array.isArray(json?.releases) ? (json.releases as ChangelogRelease[]) : []
|
||||
}
|
||||
|
||||
function formatDate(dateString: string) {
|
||||
const date = new Date(dateString)
|
||||
@@ -97,8 +130,7 @@ function CollapsibleSections(props: { sections: { title: string; items: string[]
|
||||
}
|
||||
|
||||
export default function Changelog() {
|
||||
const data = createAsync(() => changelog())
|
||||
const releases = () => data() ?? []
|
||||
const releases = createAsync(() => getReleases())
|
||||
|
||||
return (
|
||||
<main data-page="changelog">
|
||||
@@ -116,11 +148,6 @@ export default function Changelog() {
|
||||
</section>
|
||||
|
||||
<section data-component="releases">
|
||||
<Show when={releases().length === 0}>
|
||||
<p>
|
||||
No changelog entries found. <a href="/changelog.json">View JSON</a>
|
||||
</p>
|
||||
</Show>
|
||||
<For each={releases()}>
|
||||
{(release) => {
|
||||
return (
|
||||
|
||||
2
packages/desktop/src-tauri/Cargo.lock
generated
2
packages/desktop/src-tauri/Cargo.lock
generated
@@ -3028,8 +3028,6 @@ dependencies = [
|
||||
"futures",
|
||||
"gtk",
|
||||
"listeners",
|
||||
"objc2 0.6.3",
|
||||
"objc2-web-kit",
|
||||
"reqwest",
|
||||
"semver",
|
||||
"serde",
|
||||
|
||||
@@ -47,10 +47,6 @@ comrak = { version = "0.50", default-features = false }
|
||||
gtk = "0.18.2"
|
||||
webkit2gtk = "=2.0.1"
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
objc2 = "0.6"
|
||||
objc2-web-kit = "0.3"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows = { version = "0.61", features = [
|
||||
"Win32_Foundation",
|
||||
|
||||
@@ -157,7 +157,6 @@ pub fn create_command(app: &tauri::AppHandle, args: &str) -> Command {
|
||||
.unwrap()
|
||||
.args(args.split_whitespace())
|
||||
.env("OPENCODE_EXPERIMENTAL_ICON_DISCOVERY", "true")
|
||||
.env("OPENCODE_EXPERIMENTAL_FILEWATCHER", "true")
|
||||
.env("OPENCODE_CLIENT", "desktop")
|
||||
.env("XDG_STATE_HOME", &state_dir);
|
||||
|
||||
@@ -175,7 +174,6 @@ pub fn create_command(app: &tauri::AppHandle, args: &str) -> Command {
|
||||
app.shell()
|
||||
.command(&shell)
|
||||
.env("OPENCODE_EXPERIMENTAL_ICON_DISCOVERY", "true")
|
||||
.env("OPENCODE_EXPERIMENTAL_FILEWATCHER", "true")
|
||||
.env("OPENCODE_CLIENT", "desktop")
|
||||
.env("XDG_STATE_HOME", &state_dir)
|
||||
.args(["-il", "-c", &cmd])
|
||||
|
||||
@@ -29,18 +29,6 @@ impl<R: Runtime> Plugin<R> for PinchZoomDisablePlugin {
|
||||
gobject_ffi::g_signal_handlers_destroy(data.as_ptr().cast());
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
unsafe {
|
||||
use objc2::rc::Retained;
|
||||
use objc2_web_kit::WKWebView;
|
||||
|
||||
// Get the WKWebView pointer and disable magnification gestures
|
||||
// This prevents Cmd+Ctrl+scroll and pinch-to-zoom from changing the zoom level
|
||||
let wk_webview: Retained<WKWebView> =
|
||||
Retained::retain(_webview.inner().cast()).unwrap();
|
||||
wk_webview.setAllowsMagnification(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,18 +328,23 @@ render(() => {
|
||||
const [serverPassword, setServerPassword] = createSignal<string | null>(null)
|
||||
const platform = createPlatform(() => serverPassword())
|
||||
|
||||
function handleClick(e: MouseEvent) {
|
||||
const link = (e.target as HTMLElement).closest("a.external-link") as HTMLAnchorElement | null
|
||||
if (link?.href) {
|
||||
e.preventDefault()
|
||||
platform.openLink(link.href)
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
document.addEventListener("click", handleClick)
|
||||
// Handle external links - open in system browser instead of webview
|
||||
const handleClick = (e: MouseEvent) => {
|
||||
const target = e.target as HTMLElement
|
||||
const link = target.closest("a") as HTMLAnchorElement | null
|
||||
|
||||
if (link?.href && !link.href.startsWith("javascript:") && !link.href.startsWith("#")) {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
e.stopImmediatePropagation()
|
||||
void shellOpen(link.href).catch(() => undefined)
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("click", handleClick, true)
|
||||
onCleanup(() => {
|
||||
document.removeEventListener("click", handleClick)
|
||||
document.removeEventListener("click", handleClick, true)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import { createStore } from "solid-js/store"
|
||||
import z from "zod"
|
||||
import NotFound from "../[...404]"
|
||||
import { Tabs } from "@opencode-ai/ui/tabs"
|
||||
import { MessageNav } from "@opencode-ai/ui/message-nav"
|
||||
import { preloadMultiFileDiff, PreloadMultiFileDiffResult } from "@pierre/diffs/ssr"
|
||||
import { Diff as SSRDiff } from "@opencode-ai/ui/diff-ssr"
|
||||
import { clientOnly } from "@solidjs/start"
|
||||
@@ -363,15 +362,6 @@ export default function () {
|
||||
{title()}
|
||||
</div>
|
||||
<div class="flex items-start justify-start h-full min-h-0">
|
||||
<Show when={messages().length > 1}>
|
||||
<MessageNav
|
||||
class="sticky top-0 shrink-0 py-2 pl-4"
|
||||
messages={messages()}
|
||||
current={activeMessage()}
|
||||
size="compact"
|
||||
onMessageSelect={setActiveMessage}
|
||||
/>
|
||||
</Show>
|
||||
<SessionTurn
|
||||
sessionID={data().sessionID}
|
||||
messageID={store.messageId ?? firstUserMessage()!.id!}
|
||||
|
||||
@@ -3,3 +3,5 @@ preload = ["@opentui/solid/preload"]
|
||||
[test]
|
||||
preload = ["./test/preload.ts"]
|
||||
timeout = 10000 # 10 seconds (default is 5000ms)
|
||||
# Enable code coverage
|
||||
coverage = true
|
||||
|
||||
@@ -26,9 +26,6 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
|
||||
const info = await getAuth()
|
||||
if (!info || info.type !== "oauth") return {}
|
||||
|
||||
const enterpriseUrl = info.enterpriseUrl
|
||||
const baseURL = enterpriseUrl ? `https://copilot-api.${normalizeDomain(enterpriseUrl)}` : undefined
|
||||
|
||||
if (provider && provider.models) {
|
||||
for (const model of Object.values(provider.models)) {
|
||||
model.cost = {
|
||||
@@ -39,23 +36,16 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
|
||||
write: 0,
|
||||
},
|
||||
}
|
||||
|
||||
// TODO: move some of this hacky-ness to models.dev presets once we have better grasp of things here...
|
||||
const base = baseURL ?? model.api.url
|
||||
const claude = model.id.includes("claude")
|
||||
const url = iife(() => {
|
||||
if (!claude) return base
|
||||
if (base.endsWith("/v1")) return base
|
||||
if (base.endsWith("/")) return `${base}v1`
|
||||
return `${base}/v1`
|
||||
})
|
||||
|
||||
model.api.url = url
|
||||
model.api.npm = claude ? "@ai-sdk/anthropic" : "@ai-sdk/github-copilot"
|
||||
}
|
||||
}
|
||||
|
||||
const enterpriseUrl = info.enterpriseUrl
|
||||
const baseURL = enterpriseUrl
|
||||
? `https://copilot-api.${normalizeDomain(enterpriseUrl)}`
|
||||
: "https://api.githubcopilot.com"
|
||||
|
||||
return {
|
||||
baseURL,
|
||||
apiKey: "",
|
||||
async fetch(request: RequestInfo | URL, init?: RequestInit) {
|
||||
const info = await getAuth()
|
||||
@@ -277,11 +267,6 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
|
||||
},
|
||||
"chat.headers": async (input, output) => {
|
||||
if (!input.model.providerID.includes("github-copilot")) return
|
||||
|
||||
if (input.model.api.npm === "@ai-sdk/anthropic") {
|
||||
output.headers["anthropic-beta"] = "interleaved-thinking-2025-05-14"
|
||||
}
|
||||
|
||||
const session = await sdk.session
|
||||
.get({
|
||||
path: {
|
||||
|
||||
@@ -132,7 +132,6 @@ export namespace Provider {
|
||||
return {
|
||||
autoload: false,
|
||||
async getModel(sdk: any, modelID: string, _options?: Record<string, any>) {
|
||||
if (sdk.responses === undefined && sdk.chat === undefined) return sdk.languageModel(modelID)
|
||||
return shouldUseCopilotResponsesApi(modelID) ? sdk.responses(modelID) : sdk.chat(modelID)
|
||||
},
|
||||
options: {},
|
||||
@@ -142,7 +141,6 @@ export namespace Provider {
|
||||
return {
|
||||
autoload: false,
|
||||
async getModel(sdk: any, modelID: string, _options?: Record<string, any>) {
|
||||
if (sdk.responses === undefined && sdk.chat === undefined) return sdk.languageModel(modelID)
|
||||
return shouldUseCopilotResponsesApi(modelID) ? sdk.responses(modelID) : sdk.chat(modelID)
|
||||
},
|
||||
options: {},
|
||||
@@ -603,7 +601,10 @@ export namespace Provider {
|
||||
api: {
|
||||
id: model.id,
|
||||
url: provider.api!,
|
||||
npm: model.provider?.npm ?? provider.npm ?? "@ai-sdk/openai-compatible",
|
||||
npm: iife(() => {
|
||||
if (provider.id.startsWith("github-copilot")) return "@ai-sdk/github-copilot"
|
||||
return model.provider?.npm ?? provider.npm ?? "@ai-sdk/openai-compatible"
|
||||
}),
|
||||
},
|
||||
status: model.status ?? "active",
|
||||
headers: model.headers ?? {},
|
||||
@@ -923,8 +924,6 @@ export namespace Provider {
|
||||
)
|
||||
delete provider.models[modelID]
|
||||
|
||||
model.variants = mapValues(ProviderTransform.variants(model), (v) => v)
|
||||
|
||||
// Filter out disabled variants from config
|
||||
const configVariants = configProvider?.models?.[modelID]?.variants
|
||||
if (configVariants && model.variants) {
|
||||
|
||||
@@ -150,20 +150,14 @@ export namespace LLM {
|
||||
},
|
||||
)
|
||||
|
||||
const maxOutputTokens = isCodex ? undefined : undefined
|
||||
log.info("max_output_tokens", {
|
||||
tokens: ProviderTransform.maxOutputTokens(
|
||||
input.model.api.npm,
|
||||
params.options,
|
||||
input.model.limit.output,
|
||||
OUTPUT_TOKEN_MAX,
|
||||
),
|
||||
modelOptions: params.options,
|
||||
outputLimit: input.model.limit.output,
|
||||
})
|
||||
// tokens = 32000
|
||||
// outputLimit = 64000
|
||||
// modelOptions={"reasoningEffort":"minimal"}
|
||||
const maxOutputTokens = isCodex
|
||||
? undefined
|
||||
: ProviderTransform.maxOutputTokens(
|
||||
input.model.api.npm,
|
||||
params.options,
|
||||
input.model.limit.output,
|
||||
OUTPUT_TOKEN_MAX,
|
||||
)
|
||||
|
||||
const tools = await resolveTools(input)
|
||||
|
||||
|
||||
@@ -656,13 +656,6 @@ export namespace MessageV2 {
|
||||
return result
|
||||
}
|
||||
|
||||
const isOpenAiErrorRetryable = (e: APICallError) => {
|
||||
const status = e.statusCode
|
||||
if (!status) return e.isRetryable
|
||||
// openai sometimes returns 404 for models that are actually available
|
||||
return status === 404 || e.isRetryable
|
||||
}
|
||||
|
||||
export function fromError(e: unknown, ctx: { providerID: string }) {
|
||||
switch (true) {
|
||||
case e instanceof DOMException && e.name === "AbortError":
|
||||
@@ -731,7 +724,7 @@ export namespace MessageV2 {
|
||||
{
|
||||
message,
|
||||
statusCode: e.statusCode,
|
||||
isRetryable: ctx.providerID.startsWith("openai") ? isOpenAiErrorRetryable(e) : e.isRetryable,
|
||||
isRetryable: e.isRetryable,
|
||||
responseHeaders: e.responseHeaders,
|
||||
responseBody: e.responseBody,
|
||||
metadata,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { NamedError } from "@opencode-ai/util/error"
|
||||
import { MessageV2 } from "./message-v2"
|
||||
import { iife } from "@/util/iife"
|
||||
|
||||
export namespace SessionRetry {
|
||||
export const RETRY_INITIAL_DELAY = 2000
|
||||
@@ -64,36 +63,28 @@ export namespace SessionRetry {
|
||||
return error.data.message.includes("Overloaded") ? "Provider is overloaded" : error.data.message
|
||||
}
|
||||
|
||||
const json = iife(() => {
|
||||
if (typeof error.data?.message === "string") {
|
||||
try {
|
||||
if (typeof error.data?.message === "string") {
|
||||
const parsed = JSON.parse(error.data.message)
|
||||
return parsed
|
||||
const json = JSON.parse(error.data.message)
|
||||
if (json.type === "error" && json.error?.type === "too_many_requests") {
|
||||
return "Too Many Requests"
|
||||
}
|
||||
if (json.code.includes("exhausted") || json.code.includes("unavailable")) {
|
||||
return "Provider is overloaded"
|
||||
}
|
||||
if (json.type === "error" && json.error?.code?.includes("rate_limit")) {
|
||||
return "Rate Limited"
|
||||
}
|
||||
if (
|
||||
json.error?.message?.includes("no_kv_space") ||
|
||||
(json.type === "error" && json.error?.type === "server_error") ||
|
||||
!!json.error
|
||||
) {
|
||||
return "Provider Server Error"
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
return JSON.parse(error.data.message)
|
||||
} catch {
|
||||
return undefined
|
||||
}
|
||||
})
|
||||
if (!json || typeof json !== "object") return undefined
|
||||
const code = typeof json.code === "string" ? json.code : ""
|
||||
|
||||
if (json.type === "error" && json.error?.type === "too_many_requests") {
|
||||
return "Too Many Requests"
|
||||
}
|
||||
if (code.includes("exhausted") || code.includes("unavailable")) {
|
||||
return "Provider is overloaded"
|
||||
}
|
||||
if (json.type === "error" && json.error?.code?.includes("rate_limit")) {
|
||||
return "Rate Limited"
|
||||
}
|
||||
if (
|
||||
json.error?.message?.includes("no_kv_space") ||
|
||||
(json.type === "error" && json.error?.type === "server_error") ||
|
||||
!!json.error
|
||||
) {
|
||||
return "Provider Server Error"
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ export const ApplyPatchTool = Tool.define("apply_patch", {
|
||||
})
|
||||
|
||||
// Apply the changes
|
||||
const updates: Array<{ file: string; event: "add" | "change" | "unlink" }> = []
|
||||
const changedFiles: string[] = []
|
||||
|
||||
for (const change of fileChanges) {
|
||||
const edited = change.type === "delete" ? undefined : (change.movePath ?? change.filePath)
|
||||
@@ -194,12 +194,12 @@ export const ApplyPatchTool = Tool.define("apply_patch", {
|
||||
// Create parent directories (recursive: true is safe on existing/root dirs)
|
||||
await fs.mkdir(path.dirname(change.filePath), { recursive: true })
|
||||
await fs.writeFile(change.filePath, change.newContent, "utf-8")
|
||||
updates.push({ file: change.filePath, event: "add" })
|
||||
changedFiles.push(change.filePath)
|
||||
break
|
||||
|
||||
case "update":
|
||||
await fs.writeFile(change.filePath, change.newContent, "utf-8")
|
||||
updates.push({ file: change.filePath, event: "change" })
|
||||
changedFiles.push(change.filePath)
|
||||
break
|
||||
|
||||
case "move":
|
||||
@@ -208,14 +208,13 @@ export const ApplyPatchTool = Tool.define("apply_patch", {
|
||||
await fs.mkdir(path.dirname(change.movePath), { recursive: true })
|
||||
await fs.writeFile(change.movePath, change.newContent, "utf-8")
|
||||
await fs.unlink(change.filePath)
|
||||
updates.push({ file: change.filePath, event: "unlink" })
|
||||
updates.push({ file: change.movePath, event: "add" })
|
||||
changedFiles.push(change.movePath)
|
||||
}
|
||||
break
|
||||
|
||||
case "delete":
|
||||
await fs.unlink(change.filePath)
|
||||
updates.push({ file: change.filePath, event: "unlink" })
|
||||
changedFiles.push(change.filePath)
|
||||
break
|
||||
}
|
||||
|
||||
@@ -227,8 +226,8 @@ export const ApplyPatchTool = Tool.define("apply_patch", {
|
||||
}
|
||||
|
||||
// Publish file change events
|
||||
for (const update of updates) {
|
||||
await Bus.publish(FileWatcher.Event.Updated, update)
|
||||
for (const filePath of changedFiles) {
|
||||
await Bus.publish(FileWatcher.Event.Updated, { file: filePath, event: "change" })
|
||||
}
|
||||
|
||||
// Notify LSP of file changes and collect diagnostics
|
||||
|
||||
@@ -10,7 +10,6 @@ import { LSP } from "../lsp"
|
||||
import { createTwoFilesPatch, diffLines } from "diff"
|
||||
import DESCRIPTION from "./edit.txt"
|
||||
import { File } from "../file"
|
||||
import { FileWatcher } from "../file/watcher"
|
||||
import { Bus } from "../bus"
|
||||
import { FileTime } from "../file/time"
|
||||
import { Filesystem } from "../util/filesystem"
|
||||
@@ -49,7 +48,6 @@ export const EditTool = Tool.define("edit", {
|
||||
let contentNew = ""
|
||||
await FileTime.withLock(filePath, async () => {
|
||||
if (params.oldString === "") {
|
||||
const existed = await Bun.file(filePath).exists()
|
||||
contentNew = params.newString
|
||||
diff = trimDiff(createTwoFilesPatch(filePath, filePath, contentOld, contentNew))
|
||||
await ctx.ask({
|
||||
@@ -65,10 +63,6 @@ export const EditTool = Tool.define("edit", {
|
||||
await Bus.publish(File.Event.Edited, {
|
||||
file: filePath,
|
||||
})
|
||||
await Bus.publish(FileWatcher.Event.Updated, {
|
||||
file: filePath,
|
||||
event: existed ? "change" : "add",
|
||||
})
|
||||
FileTime.read(ctx.sessionID, filePath)
|
||||
return
|
||||
}
|
||||
@@ -98,10 +92,6 @@ export const EditTool = Tool.define("edit", {
|
||||
await Bus.publish(File.Event.Edited, {
|
||||
file: filePath,
|
||||
})
|
||||
await Bus.publish(FileWatcher.Event.Updated, {
|
||||
file: filePath,
|
||||
event: "change",
|
||||
})
|
||||
contentNew = await file.text()
|
||||
diff = trimDiff(
|
||||
createTwoFilesPatch(filePath, filePath, normalizeLineEndings(contentOld), normalizeLineEndings(contentNew)),
|
||||
|
||||
@@ -24,7 +24,7 @@ export const ReadTool = Tool.define("read", {
|
||||
async execute(params, ctx) {
|
||||
let filepath = params.filePath
|
||||
if (!path.isAbsolute(filepath)) {
|
||||
filepath = path.resolve(Instance.directory, filepath)
|
||||
filepath = path.join(process.cwd(), filepath)
|
||||
}
|
||||
const title = path.relative(Instance.worktree, filepath)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Tool } from "./tool"
|
||||
import { Instance } from "../project/instance"
|
||||
import { Config } from "../config/config"
|
||||
import path from "path"
|
||||
import { type ToolContext as PluginToolContext, type ToolDefinition } from "@opencode-ai/plugin"
|
||||
import { type ToolDefinition } from "@opencode-ai/plugin"
|
||||
import z from "zod"
|
||||
import { Plugin } from "../plugin"
|
||||
import { WebSearchTool } from "./websearch"
|
||||
@@ -67,8 +67,7 @@ export namespace ToolRegistry {
|
||||
parameters: z.object(def.args),
|
||||
description: def.description,
|
||||
execute: async (args, ctx) => {
|
||||
const pluginCtx = { ...ctx, directory: Instance.directory } as unknown as PluginToolContext
|
||||
const result = await def.execute(args as any, pluginCtx)
|
||||
const result = await def.execute(args as any, ctx)
|
||||
const out = await Truncate.output(result, {}, initCtx?.agent)
|
||||
return {
|
||||
title: "",
|
||||
|
||||
@@ -6,7 +6,6 @@ import { createTwoFilesPatch } from "diff"
|
||||
import DESCRIPTION from "./write.txt"
|
||||
import { Bus } from "../bus"
|
||||
import { File } from "../file"
|
||||
import { FileWatcher } from "../file/watcher"
|
||||
import { FileTime } from "../file/time"
|
||||
import { Filesystem } from "../util/filesystem"
|
||||
import { Instance } from "../project/instance"
|
||||
@@ -46,10 +45,6 @@ export const WriteTool = Tool.define("write", {
|
||||
await Bus.publish(File.Event.Edited, {
|
||||
file: filepath,
|
||||
})
|
||||
await Bus.publish(FileWatcher.Event.Updated, {
|
||||
file: filepath,
|
||||
event: exists ? "change" : "add",
|
||||
})
|
||||
FileTime.read(ctx.sessionID, filepath)
|
||||
|
||||
let output = "Wrote file successfully."
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import type { NamedError } from "@opencode-ai/util/error"
|
||||
import { APICallError } from "ai"
|
||||
import { SessionRetry } from "../../src/session/retry"
|
||||
import { MessageV2 } from "../../src/session/message-v2"
|
||||
|
||||
@@ -12,10 +10,6 @@ function apiError(headers?: Record<string, string>): MessageV2.APIError {
|
||||
}).toObject() as MessageV2.APIError
|
||||
}
|
||||
|
||||
function wrap(message: unknown): ReturnType<NamedError["toObject"]> {
|
||||
return { data: { message } } as ReturnType<NamedError["toObject"]>
|
||||
}
|
||||
|
||||
describe("session.retry.delay", () => {
|
||||
test("caps delay at 30 seconds when headers missing", () => {
|
||||
const error = apiError()
|
||||
@@ -86,28 +80,6 @@ describe("session.retry.delay", () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe("session.retry.retryable", () => {
|
||||
test("maps too_many_requests json messages", () => {
|
||||
const error = wrap(JSON.stringify({ type: "error", error: { type: "too_many_requests" } }))
|
||||
expect(SessionRetry.retryable(error)).toBe("Too Many Requests")
|
||||
})
|
||||
|
||||
test("maps overloaded provider codes", () => {
|
||||
const error = wrap(JSON.stringify({ code: "resource_exhausted" }))
|
||||
expect(SessionRetry.retryable(error)).toBe("Provider is overloaded")
|
||||
})
|
||||
|
||||
test("handles json messages without code", () => {
|
||||
const error = wrap(JSON.stringify({ error: { message: "no_kv_space" } }))
|
||||
expect(SessionRetry.retryable(error)).toBe("Provider Server Error")
|
||||
})
|
||||
|
||||
test("returns undefined for non-json message", () => {
|
||||
const error = wrap("not-json")
|
||||
expect(SessionRetry.retryable(error)).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
describe("session.message-v2.fromError", () => {
|
||||
test.concurrent(
|
||||
"converts ECONNRESET socket errors to retryable APIError",
|
||||
@@ -156,18 +128,4 @@ describe("session.message-v2.fromError", () => {
|
||||
expect(retryable).toBeDefined()
|
||||
expect(retryable).toBe("Connection reset by server")
|
||||
})
|
||||
|
||||
test("marks OpenAI 404 status codes as retryable", () => {
|
||||
const error = new APICallError({
|
||||
message: "boom",
|
||||
url: "https://api.openai.com/v1/chat/completions",
|
||||
requestBodyValues: {},
|
||||
statusCode: 404,
|
||||
responseHeaders: { "content-type": "application/json" },
|
||||
responseBody: '{"error":"boom"}',
|
||||
isRetryable: false,
|
||||
})
|
||||
const result = MessageV2.fromError(error, { providerID: "openai" }) as MessageV2.APIError
|
||||
expect(result.data.isRetryable).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -4,11 +4,6 @@ export type ToolContext = {
|
||||
sessionID: string
|
||||
messageID: string
|
||||
agent: string
|
||||
/**
|
||||
* Current project directory for this session.
|
||||
* Prefer this over process.cwd() when resolving relative paths.
|
||||
*/
|
||||
directory: string
|
||||
abort: AbortSignal
|
||||
metadata(input: { title?: string; metadata?: { [key: string]: any } }): void
|
||||
ask(input: AskInput): Promise<void>
|
||||
|
||||
@@ -627,14 +627,6 @@ export type EventSessionCompacted = {
|
||||
}
|
||||
}
|
||||
|
||||
export type EventFileWatcherUpdated = {
|
||||
type: "file.watcher.updated"
|
||||
properties: {
|
||||
file: string
|
||||
event: "add" | "change" | "unlink"
|
||||
}
|
||||
}
|
||||
|
||||
export type Todo = {
|
||||
/**
|
||||
* Brief description of the task
|
||||
@@ -662,6 +654,14 @@ export type EventTodoUpdated = {
|
||||
}
|
||||
}
|
||||
|
||||
export type EventFileWatcherUpdated = {
|
||||
type: "file.watcher.updated"
|
||||
properties: {
|
||||
file: string
|
||||
event: "add" | "change" | "unlink"
|
||||
}
|
||||
}
|
||||
|
||||
export type EventTuiPromptAppend = {
|
||||
type: "tui.prompt.append"
|
||||
properties: {
|
||||
@@ -903,8 +903,8 @@ export type Event =
|
||||
| EventQuestionReplied
|
||||
| EventQuestionRejected
|
||||
| EventSessionCompacted
|
||||
| EventFileWatcherUpdated
|
||||
| EventTodoUpdated
|
||||
| EventFileWatcherUpdated
|
||||
| EventTuiPromptAppend
|
||||
| EventTuiCommandExecute
|
||||
| EventTuiToastShow
|
||||
|
||||
@@ -7528,41 +7528,6 @@
|
||||
},
|
||||
"required": ["type", "properties"]
|
||||
},
|
||||
"Event.file.watcher.updated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "file.watcher.updated"
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"file": {
|
||||
"type": "string"
|
||||
},
|
||||
"event": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"const": "add"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"const": "change"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"const": "unlink"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["file", "event"]
|
||||
}
|
||||
},
|
||||
"required": ["type", "properties"]
|
||||
},
|
||||
"Todo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -7610,6 +7575,41 @@
|
||||
},
|
||||
"required": ["type", "properties"]
|
||||
},
|
||||
"Event.file.watcher.updated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"const": "file.watcher.updated"
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"file": {
|
||||
"type": "string"
|
||||
},
|
||||
"event": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"const": "add"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"const": "change"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"const": "unlink"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["file", "event"]
|
||||
}
|
||||
},
|
||||
"required": ["type", "properties"]
|
||||
},
|
||||
"Event.tui.prompt.append": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -8276,10 +8276,10 @@
|
||||
"$ref": "#/components/schemas/Event.session.compacted"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/Event.file.watcher.updated"
|
||||
"$ref": "#/components/schemas/Event.todo.updated"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/Event.todo.updated"
|
||||
"$ref": "#/components/schemas/Event.file.watcher.updated"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/Event.tui.prompt.append"
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
padding: 0 12px 0 8px;
|
||||
}
|
||||
|
||||
gap: 4px;
|
||||
gap: 8px;
|
||||
|
||||
/* text-14-medium */
|
||||
font-family: var(--font-family-sans);
|
||||
|
||||
@@ -76,12 +76,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&[data-variant="ghost"][data-scope="filetree"] {
|
||||
> [data-slot="collapsible-trigger"] {
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideDown {
|
||||
|
||||
@@ -5,6 +5,12 @@
|
||||
inset: 0;
|
||||
z-index: 50;
|
||||
background-color: hsl(from var(--background-base) h s l / 0.2);
|
||||
|
||||
/* animation: overlayHide 250ms ease 100ms forwards; */
|
||||
/**/
|
||||
/* &[data-expanded] { */
|
||||
/* animation: overlayShow 250ms ease; */
|
||||
/* } */
|
||||
}
|
||||
|
||||
[data-component="dialog"] {
|
||||
@@ -52,6 +58,12 @@
|
||||
background-clip: padding-box;
|
||||
box-shadow: var(--shadow-lg-border-base);
|
||||
|
||||
/* animation: contentHide 300ms ease-in forwards; */
|
||||
/**/
|
||||
/* &[data-expanded] { */
|
||||
/* animation: contentShow 300ms ease-out; */
|
||||
/* } */
|
||||
|
||||
[data-slot="dialog-header"] {
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
@@ -135,14 +147,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
[data-component="dialog"][data-transition] [data-slot="dialog-content"] {
|
||||
animation: contentHide 100ms ease-in forwards;
|
||||
|
||||
&[data-expanded] {
|
||||
animation: contentShow 150ms ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes overlayShow {
|
||||
from {
|
||||
opacity: 0;
|
||||
@@ -162,7 +166,7 @@
|
||||
@keyframes contentShow {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: scale(0.98);
|
||||
transform: scale(0.96);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
@@ -176,6 +180,6 @@
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: scale(0.98);
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,18 +11,12 @@ export interface DialogProps extends ParentProps {
|
||||
class?: ComponentProps<"div">["class"]
|
||||
classList?: ComponentProps<"div">["classList"]
|
||||
fit?: boolean
|
||||
transition?: boolean
|
||||
}
|
||||
|
||||
export function Dialog(props: DialogProps) {
|
||||
const i18n = useI18n()
|
||||
return (
|
||||
<div
|
||||
data-component="dialog"
|
||||
data-fit={props.fit ? true : undefined}
|
||||
data-size={props.size || "normal"}
|
||||
data-transition={props.transition ? true : undefined}
|
||||
>
|
||||
<div data-component="dialog" data-fit={props.fit ? true : undefined} data-size={props.size || "normal"}>
|
||||
<div data-slot="dialog-container">
|
||||
<Kobalte.Content
|
||||
data-slot="dialog-content"
|
||||
|
||||
@@ -73,8 +73,6 @@ const icons = {
|
||||
selector: `<path d="M6.66626 12.5033L9.99959 15.8366L13.3329 12.5033M6.66626 7.50326L9.99959 4.16992L13.3329 7.50326" stroke="currentColor" stroke-linecap="square"/>`,
|
||||
"arrow-down-to-line": `<path d="M15.2083 11.6667L10 16.875L4.79167 11.6667M10 16.25V3.125" stroke="currentColor" stroke-width="1.25" stroke-linecap="square"/>`,
|
||||
link: `<path d="M2.08334 12.0833L1.72979 11.7298L1.37624 12.0833L1.72979 12.4369L2.08334 12.0833ZM7.91668 17.9167L7.56312 18.2702L7.91668 18.6238L8.27023 18.2702L7.91668 17.9167ZM17.9167 7.91666L18.2702 8.27022L18.6238 7.91666L18.2702 7.56311L17.9167 7.91666ZM12.0833 2.08333L12.4369 1.72977L12.0833 1.37622L11.7298 1.72977L12.0833 2.08333ZM8.39646 5.06311L8.0429 5.41666L8.75001 6.12377L9.10356 5.77021L8.75001 5.41666L8.39646 5.06311ZM5.77023 9.10355L6.12378 8.74999L5.41668 8.04289L5.06312 8.39644L5.41668 8.74999L5.77023 9.10355ZM14.2298 10.8964L13.8762 11.25L14.5833 11.9571L14.9369 11.6035L14.5833 11.25L14.2298 10.8964ZM11.6036 14.9369L11.9571 14.5833L11.25 13.8762L10.8965 14.2298L11.25 14.5833L11.6036 14.9369ZM7.14646 12.1464L6.7929 12.5L7.50001 13.2071L7.85356 12.8535L7.50001 12.5L7.14646 12.1464ZM12.8536 7.85355L13.2071 7.49999L12.5 6.79289L12.1465 7.14644L12.5 7.49999L12.8536 7.85355ZM2.08334 12.0833L1.72979 12.4369L7.56312 18.2702L7.91668 17.9167L8.27023 17.5631L2.4369 11.7298L2.08334 12.0833ZM17.9167 7.91666L18.2702 7.56311L12.4369 1.72977L12.0833 2.08333L11.7298 2.43688L17.5631 8.27022L17.9167 7.91666ZM12.0833 2.08333L11.7298 1.72977L8.39646 5.06311L8.75001 5.41666L9.10356 5.77021L12.4369 2.43688L12.0833 2.08333ZM5.41668 8.74999L5.06312 8.39644L1.72979 11.7298L2.08334 12.0833L2.4369 12.4369L5.77023 9.10355L5.41668 8.74999ZM14.5833 11.25L14.9369 11.6035L18.2702 8.27022L17.9167 7.91666L17.5631 7.56311L14.2298 10.8964L14.5833 11.25ZM7.91668 17.9167L8.27023 18.2702L11.6036 14.9369L11.25 14.5833L10.8965 14.2298L7.56312 17.5631L7.91668 17.9167ZM7.50001 12.5L7.85356 12.8535L12.8536 7.85355L12.5 7.49999L12.1465 7.14644L7.14646 12.1464L7.50001 12.5Z" fill="currentColor"/>`,
|
||||
providers: `<path d="M10.0001 4.37562V2.875M13 4.37793V2.87793M7.00014 4.37793V2.875M10 17.1279V15.6279M13 17.1279V15.6279M7 17.1279V15.6279M15.625 13.0029H17.125M15.625 7.00293H17.125M15.625 10.0029H17.125M2.875 10.0029H4.375M2.875 13.0029H4.375M2.875 7.00293H4.375M4.375 4.37793H15.625V15.6279H4.375V4.37793ZM12.6241 10.0022C12.6241 11.4519 11.4488 12.6272 9.99908 12.6272C8.54934 12.6272 7.37408 11.4519 7.37408 10.0022C7.37408 8.55245 8.54934 7.3772 9.99908 7.3772C11.4488 7.3772 12.6241 8.55245 12.6241 10.0022Z" stroke="currentColor" stroke-linecap="square"/>`,
|
||||
models: `<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5 10C12.2917 10 10 12.2917 10 17.5C10 12.2917 7.70833 10 2.5 10C7.70833 10 10 7.70833 10 2.5C10 7.70833 12.2917 10 17.5 10Z" stroke="currentColor"/>`,
|
||||
}
|
||||
|
||||
export interface IconProps extends ComponentProps<"svg"> {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { onMount, Show, splitProps, type JSX } from "solid-js"
|
||||
import { Button } from "./button"
|
||||
import { Icon } from "./icon"
|
||||
import { useI18n } from "../context/i18n"
|
||||
|
||||
export type LineCommentVariant = "default" | "editor"
|
||||
|
||||
@@ -61,18 +60,13 @@ export type LineCommentProps = Omit<LineCommentAnchorProps, "children" | "varian
|
||||
}
|
||||
|
||||
export const LineComment = (props: LineCommentProps) => {
|
||||
const i18n = useI18n()
|
||||
const [split, rest] = splitProps(props, ["comment", "selection"])
|
||||
|
||||
return (
|
||||
<LineCommentAnchor {...rest} variant="default">
|
||||
<div data-slot="line-comment-content">
|
||||
<div data-slot="line-comment-text">{split.comment}</div>
|
||||
<div data-slot="line-comment-label">
|
||||
{i18n.t("ui.lineComment.label.prefix")}
|
||||
{split.selection}
|
||||
{i18n.t("ui.lineComment.label.suffix")}
|
||||
</div>
|
||||
<div data-slot="line-comment-label">Comment on {split.selection}</div>
|
||||
</div>
|
||||
</LineCommentAnchor>
|
||||
)
|
||||
@@ -92,7 +86,6 @@ export type LineCommentEditorProps = Omit<LineCommentAnchorProps, "children" | "
|
||||
}
|
||||
|
||||
export const LineCommentEditor = (props: LineCommentEditorProps) => {
|
||||
const i18n = useI18n()
|
||||
const [split, rest] = splitProps(props, [
|
||||
"value",
|
||||
"selection",
|
||||
@@ -132,7 +125,7 @@ export const LineCommentEditor = (props: LineCommentEditorProps) => {
|
||||
}}
|
||||
data-slot="line-comment-textarea"
|
||||
rows={split.rows ?? 3}
|
||||
placeholder={split.placeholder ?? i18n.t("ui.lineComment.placeholder")}
|
||||
placeholder={split.placeholder ?? "Add comment"}
|
||||
value={split.value}
|
||||
onInput={(e) => split.onInput(e.currentTarget.value)}
|
||||
onKeyDown={(e) => {
|
||||
@@ -150,16 +143,12 @@ export const LineCommentEditor = (props: LineCommentEditorProps) => {
|
||||
}}
|
||||
/>
|
||||
<div data-slot="line-comment-actions">
|
||||
<div data-slot="line-comment-editor-label">
|
||||
{i18n.t("ui.lineComment.editorLabel.prefix")}
|
||||
{split.selection}
|
||||
{i18n.t("ui.lineComment.editorLabel.suffix")}
|
||||
</div>
|
||||
<div data-slot="line-comment-editor-label">Commenting on {split.selection}</div>
|
||||
<Button size="small" variant="ghost" onClick={split.onCancel}>
|
||||
{split.cancelLabel ?? i18n.t("ui.common.cancel")}
|
||||
{split.cancelLabel ?? "Cancel"}
|
||||
</Button>
|
||||
<Button size="small" variant="primary" disabled={split.value.trim().length === 0} onClick={submit}>
|
||||
{split.submitLabel ?? i18n.t("ui.lineComment.submit")}
|
||||
{split.submitLabel ?? "Comment"}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -105,24 +105,6 @@
|
||||
color: var(--icon-active);
|
||||
}
|
||||
}
|
||||
|
||||
> [data-component="icon-button"] {
|
||||
background-color: transparent;
|
||||
|
||||
&:hover:not(:disabled),
|
||||
&:focus:not(:disabled),
|
||||
&:active:not(:disabled) {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&:hover:not(:disabled) [data-slot="icon-svg"] {
|
||||
color: var(--icon-hover);
|
||||
}
|
||||
|
||||
&:active:not(:disabled) [data-slot="icon-svg"] {
|
||||
color: var(--icon-active);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[data-slot="list-scroll"] {
|
||||
|
||||
@@ -21,12 +21,6 @@
|
||||
transform: translateX(50%);
|
||||
cursor: col-resize;
|
||||
|
||||
&[data-edge="start"] {
|
||||
inset-inline-start: 0;
|
||||
inset-inline-end: auto;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
&::after {
|
||||
width: 3px;
|
||||
inset-block: 0;
|
||||
@@ -42,12 +36,6 @@
|
||||
transform: translateY(-50%);
|
||||
cursor: row-resize;
|
||||
|
||||
&[data-edge="end"] {
|
||||
inset-block-start: auto;
|
||||
inset-block-end: 0;
|
||||
transform: translateY(50%);
|
||||
}
|
||||
|
||||
&::after {
|
||||
height: 3px;
|
||||
inset-inline: 0;
|
||||
|
||||
@@ -2,7 +2,6 @@ import { splitProps, type JSX } from "solid-js"
|
||||
|
||||
export interface ResizeHandleProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "onResize"> {
|
||||
direction: "horizontal" | "vertical"
|
||||
edge?: "start" | "end"
|
||||
size: number
|
||||
min: number
|
||||
max: number
|
||||
@@ -14,7 +13,6 @@ export interface ResizeHandleProps extends Omit<JSX.HTMLAttributes<HTMLDivElemen
|
||||
export function ResizeHandle(props: ResizeHandleProps) {
|
||||
const [local, rest] = splitProps(props, [
|
||||
"direction",
|
||||
"edge",
|
||||
"size",
|
||||
"min",
|
||||
"max",
|
||||
@@ -27,7 +25,6 @@ export function ResizeHandle(props: ResizeHandleProps) {
|
||||
|
||||
const handleMouseDown = (e: MouseEvent) => {
|
||||
e.preventDefault()
|
||||
const edge = local.edge ?? (local.direction === "vertical" ? "start" : "end")
|
||||
const start = local.direction === "horizontal" ? e.clientX : e.clientY
|
||||
const startSize = local.size
|
||||
let current = startSize
|
||||
@@ -37,14 +34,7 @@ export function ResizeHandle(props: ResizeHandleProps) {
|
||||
|
||||
const onMouseMove = (moveEvent: MouseEvent) => {
|
||||
const pos = local.direction === "horizontal" ? moveEvent.clientX : moveEvent.clientY
|
||||
const delta =
|
||||
local.direction === "vertical"
|
||||
? edge === "end"
|
||||
? pos - start
|
||||
: start - pos
|
||||
: edge === "start"
|
||||
? start - pos
|
||||
: pos - start
|
||||
const delta = local.direction === "vertical" ? start - pos : pos - start
|
||||
current = startSize + delta
|
||||
const clamped = Math.min(local.max, Math.max(local.min, current))
|
||||
local.onResize(clamped)
|
||||
@@ -71,7 +61,6 @@ export function ResizeHandle(props: ResizeHandleProps) {
|
||||
{...rest}
|
||||
data-component="resize-handle"
|
||||
data-direction={local.direction}
|
||||
data-edge={local.edge ?? (local.direction === "vertical" ? "start" : "end")}
|
||||
classList={{
|
||||
...(local.classList ?? {}),
|
||||
[local.class ?? ""]: !!local.class,
|
||||
|
||||
@@ -9,7 +9,6 @@ import { StickyAccordionHeader } from "./sticky-accordion-header"
|
||||
import { useDiffComponent } from "../context/diff"
|
||||
import { useI18n } from "../context/i18n"
|
||||
import { getDirectory, getFilename } from "@opencode-ai/util/path"
|
||||
import { checksum } from "@opencode-ai/util/encode"
|
||||
import { createEffect, createMemo, createSignal, For, Match, Show, Switch, type JSX } from "solid-js"
|
||||
import { createStore } from "solid-js/store"
|
||||
import { type FileContent, type FileDiff } from "@opencode-ai/sdk/v2"
|
||||
@@ -119,12 +118,6 @@ function dataUrlFromValue(value: unknown): string | undefined {
|
||||
return `data:${mime};base64,${content}`
|
||||
}
|
||||
|
||||
function diffId(file: string): string | undefined {
|
||||
const sum = checksum(file)
|
||||
if (!sum) return
|
||||
return `session-review-diff-${sum}`
|
||||
}
|
||||
|
||||
type SessionReviewSelection = {
|
||||
file: string
|
||||
range: SelectedLineRange
|
||||
@@ -496,12 +489,7 @@ export const SessionReview = (props: SessionReviewProps) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<Accordion.Item
|
||||
value={diff.file}
|
||||
id={diffId(diff.file)}
|
||||
data-file={diff.file}
|
||||
data-slot="session-review-accordion-item"
|
||||
>
|
||||
<Accordion.Item value={diff.file} data-slot="session-review-accordion-item">
|
||||
<StickyAccordionHeader>
|
||||
<Accordion.Trigger>
|
||||
<div data-slot="session-review-trigger-content">
|
||||
@@ -530,12 +518,12 @@ export const SessionReview = (props: SessionReviewProps) => {
|
||||
<Switch>
|
||||
<Match when={isAdded()}>
|
||||
<span data-slot="session-review-change" data-type="added">
|
||||
{i18n.t("ui.sessionReview.change.added")}
|
||||
Added
|
||||
</span>
|
||||
</Match>
|
||||
<Match when={isDeleted()}>
|
||||
<span data-slot="session-review-change" data-type="removed">
|
||||
{i18n.t("ui.sessionReview.change.removed")}
|
||||
Removed
|
||||
</span>
|
||||
</Match>
|
||||
<Match when={true}>
|
||||
|
||||
@@ -283,7 +283,6 @@ export function SessionTurn(
|
||||
|
||||
const shellModePart = createMemo(() => {
|
||||
const p = parts()
|
||||
if (p.length === 0) return
|
||||
if (!p.every((part) => part?.type === "text" && part?.synthetic)) return
|
||||
|
||||
const msgs = assistantMessages()
|
||||
|
||||
@@ -212,79 +212,6 @@
|
||||
/* } */
|
||||
}
|
||||
|
||||
&[data-variant="pill"][data-orientation="horizontal"] {
|
||||
background-color: transparent;
|
||||
|
||||
[data-slot="tabs-list"] {
|
||||
height: auto;
|
||||
padding: 6px 0;
|
||||
gap: 4px;
|
||||
background-color: var(--background-base);
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
[data-slot="tabs-trigger-wrapper"] {
|
||||
height: 32px;
|
||||
border: none;
|
||||
border-radius: var(--radius-sm);
|
||||
background-color: transparent;
|
||||
gap: 0;
|
||||
|
||||
/* text-13-medium */
|
||||
font-family: var(--font-family-sans);
|
||||
font-size: var(--font-size-small);
|
||||
font-style: normal;
|
||||
font-weight: var(--font-weight-medium);
|
||||
line-height: var(--line-height-large);
|
||||
letter-spacing: var(--letter-spacing-normal);
|
||||
|
||||
[data-slot="tabs-trigger"] {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 0 12px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
background-color: var(--surface-raised-base-hover);
|
||||
color: var(--text-strong);
|
||||
}
|
||||
|
||||
&:has([data-selected]) {
|
||||
background-color: var(--surface-raised-base-active);
|
||||
color: var(--text-strong);
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
background-color: var(--surface-raised-base-active);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&[data-variant="pill"][data-orientation="horizontal"][data-scope="filetree"] {
|
||||
[data-slot="tabs-list"] {
|
||||
padding: 12px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
[data-slot="tabs-trigger-wrapper"] {
|
||||
height: 26px;
|
||||
border-radius: 6px;
|
||||
color: var(--text-weak);
|
||||
|
||||
&:not(:has([data-selected])):hover:not(:disabled) {
|
||||
color: var(--text-base);
|
||||
}
|
||||
|
||||
&:has([data-selected]) {
|
||||
color: var(--text-strong);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&[data-orientation="vertical"] {
|
||||
flex-direction: row;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Show, splitProps, type JSX } from "solid-js"
|
||||
import type { ComponentProps, ParentProps, Component } from "solid-js"
|
||||
|
||||
export interface TabsProps extends ComponentProps<typeof Kobalte> {
|
||||
variant?: "normal" | "alt" | "pill" | "settings"
|
||||
variant?: "normal" | "alt" | "settings"
|
||||
orientation?: "horizontal" | "vertical"
|
||||
}
|
||||
export interface TabsListProps extends ComponentProps<typeof Kobalte.List> {}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user