Compare commits

..
Author SHA1 Message Date
opencode 9d57a83a75 release: v1.14.35 2026-05-05 01:01:35 +00:00
1737 changed files with 120105 additions and 309279 deletions
-1
View File
@@ -13,4 +13,3 @@ R44VC0RP
rekram1-node rekram1-node
thdxr thdxr
simonklee simonklee
vimtor
+3 -11
View File
@@ -23,7 +23,7 @@ runs:
fi fi
- name: Setup Bun - name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 uses: oven-sh/setup-bun@v2
with: with:
bun-version-file: ${{ !steps.bun-url.outputs.url && 'package.json' || '' }} bun-version-file: ${{ !steps.bun-url.outputs.url && 'package.json' || '' }}
bun-download-url: ${{ steps.bun-url.outputs.url }} bun-download-url: ${{ steps.bun-url.outputs.url }}
@@ -33,9 +33,8 @@ runs:
shell: bash shell: bash
run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT"
- name: Restore Bun dependencies - name: Cache Bun dependencies
id: bun-cache uses: actions/cache@v4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with: with:
path: ${{ steps.cache.outputs.dir }} path: ${{ steps.cache.outputs.dir }}
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
@@ -57,10 +56,3 @@ runs:
bun install ${{ inputs.install-flags }} bun install ${{ inputs.install-flags }}
fi fi
shell: bash shell: bash
- name: Save Bun dependencies
if: steps.bun-cache.outputs.cache-hit != 'true' && github.event_name != 'pull_request' && github.event_name != 'pull_request_target'
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ steps.cache.outputs.dir }}
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
@@ -19,7 +19,7 @@ runs:
steps: steps:
- name: Create app token - name: Create app token
id: apptoken id: apptoken
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2.2.2 uses: actions/create-github-app-token@v2
with: with:
app-id: ${{ inputs.opencode-app-id }} app-id: ${{ inputs.opencode-app-id }}
private-key: ${{ inputs.opencode-app-secret }} private-key: ${{ inputs.opencode-app-secret }}
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
+2 -2
View File
@@ -12,9 +12,9 @@ jobs:
contents: read contents: read
issues: write issues: write
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@v4
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 - uses: oven-sh/setup-bun@v2
with: with:
bun-version: latest bun-version: latest
-50
View File
@@ -1,50 +0,0 @@
name: close-prs
on:
schedule:
- cron: "0 22 * * *" # Daily at 10:00 PM UTC
workflow_dispatch:
inputs:
dry-run:
description: "Log matching PRs without closing them"
type: boolean
default: true
max-close:
description: "Maximum matching PRs to close"
type: string
required: false
default: "50"
jobs:
close:
runs-on: ubuntu-latest
timeout-minutes: 240
permissions:
contents: read
issues: write
pull-requests: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest
- name: Close old PRs without enough positive reactions
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
max_close="${{ inputs['max-close'] }}"
if [ -z "$max_close" ]; then
max_close="50"
fi
args=("--threshold" "2" "--age-months" "1" "--sleep-ms" "20000" "--max-close" "$max_close")
if [ "${{ github.event_name }}" = "schedule" ]; then
args+=("--execute")
elif [ "${{ inputs['dry-run'] }}" = "false" ]; then
args+=("--execute")
fi
bun script/github/close-prs.ts "${args[@]}"
+235
View File
@@ -0,0 +1,235 @@
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
timeout-minutes: 15
steps:
- name: Close inactive PRs
uses: actions/github-script@v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const DAYS_INACTIVE = 60
const MAX_RETRIES = 3
// Adaptive delay: fast for small batches, slower for large to respect
// GitHub's 80 content-generating requests/minute limit
const SMALL_BATCH_THRESHOLD = 10
const SMALL_BATCH_DELAY_MS = 1000 // 1s for daily operations (≤10 PRs)
const LARGE_BATCH_DELAY_MS = 2000 // 2s for backlog (>10 PRs) = ~30 ops/min, well under 80 limit
const startTime = Date.now()
const cutoff = new Date(Date.now() - DAYS_INACTIVE * 24 * 60 * 60 * 1000)
const { owner, repo } = context.repo
const dryRun = context.payload.inputs?.dryRun === "true"
core.info(`Dry run mode: ${dryRun}`)
core.info(`Cutoff date: ${cutoff.toISOString()}`)
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
async function withRetry(fn, description = 'API call') {
let lastError
for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
try {
const result = await fn()
return result
} catch (error) {
lastError = error
const isRateLimited = error.status === 403 &&
(error.message?.includes('rate limit') || error.message?.includes('secondary'))
if (!isRateLimited) {
throw error
}
// Parse retry-after header, default to 60 seconds
const retryAfter = error.response?.headers?.['retry-after']
? parseInt(error.response.headers['retry-after'])
: 60
// Exponential backoff: retryAfter * 2^attempt
const backoffMs = retryAfter * 1000 * Math.pow(2, attempt)
core.warning(`${description}: Rate limited (attempt ${attempt + 1}/${MAX_RETRIES}). Waiting ${backoffMs / 1000}s before retry...`)
await sleep(backoffMs)
}
}
core.error(`${description}: Max retries (${MAX_RETRIES}) exceeded`)
throw lastError
}
const query = `
query($owner: String!, $repo: String!, $cursor: String) {
repository(owner: $owner, name: $repo) {
pullRequests(first: 100, states: OPEN, after: $cursor) {
pageInfo {
hasNextPage
endCursor
}
nodes {
number
title
author {
login
}
createdAt
commits(last: 1) {
nodes {
commit {
committedDate
}
}
}
comments(last: 1) {
nodes {
createdAt
}
}
reviews(last: 1) {
nodes {
createdAt
}
}
}
}
}
}
`
const allPrs = []
let cursor = null
let hasNextPage = true
let pageCount = 0
while (hasNextPage) {
pageCount++
core.info(`Fetching page ${pageCount} of open PRs...`)
const result = await withRetry(
() => github.graphql(query, { owner, repo, cursor }),
`GraphQL page ${pageCount}`
)
allPrs.push(...result.repository.pullRequests.nodes)
hasNextPage = result.repository.pullRequests.pageInfo.hasNextPage
cursor = result.repository.pullRequests.pageInfo.endCursor
core.info(`Page ${pageCount}: fetched ${result.repository.pullRequests.nodes.length} PRs (total: ${allPrs.length})`)
// Delay between pagination requests (use small batch delay for reads)
if (hasNextPage) {
await sleep(SMALL_BATCH_DELAY_MS)
}
}
core.info(`Found ${allPrs.length} open pull requests`)
const stalePrs = allPrs.filter((pr) => {
const dates = [
new Date(pr.createdAt),
pr.commits.nodes[0] ? new Date(pr.commits.nodes[0].commit.committedDate) : null,
pr.comments.nodes[0] ? new Date(pr.comments.nodes[0].createdAt) : null,
pr.reviews.nodes[0] ? new Date(pr.reviews.nodes[0].createdAt) : null,
].filter((d) => d !== null)
const lastActivity = dates.sort((a, b) => b.getTime() - a.getTime())[0]
if (!lastActivity || lastActivity > cutoff) {
core.info(`PR #${pr.number} is fresh (last activity: ${lastActivity?.toISOString() || "unknown"})`)
return false
}
core.info(`PR #${pr.number} is STALE (last activity: ${lastActivity.toISOString()})`)
return true
})
if (!stalePrs.length) {
core.info("No stale pull requests found.")
return
}
core.info(`Found ${stalePrs.length} stale pull requests`)
// ============================================
// Close stale PRs
// ============================================
const requestDelayMs = stalePrs.length > SMALL_BATCH_THRESHOLD
? LARGE_BATCH_DELAY_MS
: SMALL_BATCH_DELAY_MS
core.info(`Using ${requestDelayMs}ms delay between operations (${stalePrs.length > SMALL_BATCH_THRESHOLD ? 'large' : 'small'} batch mode)`)
let closedCount = 0
let skippedCount = 0
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.author?.login || 'unknown'}: ${pr.title}`)
continue
}
try {
// Add comment
await withRetry(
() => github.rest.issues.createComment({
owner,
repo,
issue_number,
body: closeComment,
}),
`Comment on PR #${issue_number}`
)
// Close PR
await withRetry(
() => github.rest.pulls.update({
owner,
repo,
pull_number: issue_number,
state: "closed",
}),
`Close PR #${issue_number}`
)
closedCount++
core.info(`Closed PR #${issue_number} from ${pr.author?.login || 'unknown'}: ${pr.title}`)
// Delay before processing next PR
await sleep(requestDelayMs)
} catch (error) {
skippedCount++
core.error(`Failed to close PR #${issue_number}: ${error.message}`)
}
}
const elapsed = Math.round((Date.now() - startTime) / 1000)
core.info(`\n========== Summary ==========`)
core.info(`Total open PRs found: ${allPrs.length}`)
core.info(`Stale PRs identified: ${stalePrs.length}`)
core.info(`PRs closed: ${closedCount}`)
core.info(`PRs skipped (errors): ${skippedCount}`)
core.info(`Elapsed time: ${elapsed}s`)
core.info(`=============================`)
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Close non-compliant issues and PRs after 2 hours - name: Close non-compliant issues and PRs after 2 hours
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 uses: actions/github-script@v7
with: with:
script: | script: |
const { data: items } = await github.rest.issues.listForRepo({ const { data: items } = await github.rest.issues.listForRepo({
+4 -4
View File
@@ -21,18 +21,18 @@ jobs:
REGISTRY: ghcr.io/${{ github.repository_owner }} REGISTRY: ghcr.io/${{ github.repository_owner }}
TAG: "24.04" TAG: "24.04"
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@v4
- uses: ./.github/actions/setup-bun - uses: ./.github/actions/setup-bun
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 uses: docker/setup-buildx-action@v3
- name: Login to GHCR - name: Login to GHCR
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
+2 -3
View File
@@ -13,11 +13,11 @@ jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/checkout@v3
- uses: ./.github/actions/setup-bun - uses: ./.github/actions/setup-bun
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - uses: actions/setup-node@v4
with: with:
node-version: "24" node-version: "24"
@@ -36,7 +36,6 @@ jobs:
PLANETSCALE_SERVICE_TOKEN_NAME: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_NAME }} PLANETSCALE_SERVICE_TOKEN_NAME: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_NAME }}
PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }} PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }}
STRIPE_SECRET_KEY: ${{ github.ref_name == 'production' && secrets.STRIPE_SECRET_KEY_PROD || secrets.STRIPE_SECRET_KEY_DEV }} STRIPE_SECRET_KEY: ${{ github.ref_name == 'production' && secrets.STRIPE_SECRET_KEY_PROD || secrets.STRIPE_SECRET_KEY_DEV }}
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ vars.SENTRY_ORG }} SENTRY_ORG: ${{ vars.SENTRY_ORG }}
SENTRY_PROJECT: ${{ vars.WEB_SENTRY_PROJECT }} SENTRY_PROJECT: ${{ vars.WEB_SENTRY_PROJECT }}
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
contents: write contents: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
with: with:
persist-credentials: false persist-credentials: false
fetch-depth: 0 fetch-depth: 0
+2 -2
View File
@@ -18,7 +18,7 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
with: with:
fetch-depth: 0 # Fetch full history to access commits fetch-depth: 0 # Fetch full history to access commits
@@ -43,7 +43,7 @@ jobs:
- name: Run opencode - name: Run opencode
if: steps.commits.outputs.has_commits == 'true' if: steps.commits.outputs.has_commits == 'true'
uses: sst/opencode/github@2c14fc5586fe0b88e5c04732d2e846769cc35671 # latest uses: sst/opencode/github@latest
env: env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
with: with:
+2 -2
View File
@@ -13,7 +13,7 @@ jobs:
issues: write issues: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
with: with:
fetch-depth: 1 fetch-depth: 1
@@ -125,7 +125,7 @@ jobs:
issues: write issues: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
with: with:
fetch-depth: 1 fetch-depth: 1
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
- name: Setup Bun - name: Setup Bun
uses: ./.github/actions/setup-bun uses: ./.github/actions/setup-bun
+2 -2
View File
@@ -20,10 +20,10 @@ jobs:
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@v6
- name: Setup Nix - name: Setup Nix
uses: nixbuild/nix-quick-install-action@2c9db80fb984ceb1bcaa77cdda3fdf8cfba92035 # v34 uses: nixbuild/nix-quick-install-action@v34
- name: Evaluate flake outputs (all systems) - name: Evaluate flake outputs (all systems)
run: | run: |
+5 -5
View File
@@ -41,10 +41,10 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@v6
- name: Setup Nix - name: Setup Nix
uses: nixbuild/nix-quick-install-action@2c9db80fb984ceb1bcaa77cdda3fdf8cfba92035 # v34 uses: nixbuild/nix-quick-install-action@v34
- name: Compute node_modules hash - name: Compute node_modules hash
id: hash id: hash
@@ -72,7 +72,7 @@ jobs:
echo "Computed hash for ${SYSTEM}: $HASH" echo "Computed hash for ${SYSTEM}: $HASH"
- name: Upload hash - name: Upload hash
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@v4
with: with:
name: hash-${{ matrix.system }} name: hash-${{ matrix.system }}
path: hash.txt path: hash.txt
@@ -85,7 +85,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
with: with:
persist-credentials: false persist-credentials: false
fetch-depth: 0 fetch-depth: 0
@@ -102,7 +102,7 @@ jobs:
git pull --rebase --autostash origin "$GITHUB_REF_NAME" git pull --rebase --autostash origin "$GITHUB_REF_NAME"
- name: Download hash artifacts - name: Download hash artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 uses: actions/download-artifact@v4
with: with:
path: hashes path: hashes
pattern: hash-* pattern: hash-*
+1 -1
View File
@@ -9,6 +9,6 @@ jobs:
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
steps: steps:
- name: Send nicely-formatted embed to Discord - name: Send nicely-formatted embed to Discord
uses: SethCohen/github-releases-to-discord@24d166886aee4646d448c8a389ff9e1ebcab3682 # v1.20.0 uses: SethCohen/github-releases-to-discord@v1
with: with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }} webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
+2 -2
View File
@@ -21,12 +21,12 @@ jobs:
issues: read issues: read
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
- uses: ./.github/actions/setup-bun - uses: ./.github/actions/setup-bun
- name: Run opencode - name: Run opencode
uses: anomalyco/opencode/github@2c14fc5586fe0b88e5c04732d2e846769cc35671 # latest uses: anomalyco/opencode/github@latest
env: env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
OPENCODE_PERMISSION: '{"bash": "deny"}' OPENCODE_PERMISSION: '{"bash": "deny"}'
+2 -2
View File
@@ -12,7 +12,7 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
with: with:
fetch-depth: 1 fetch-depth: 1
@@ -78,7 +78,7 @@ jobs:
issues: write issues: write
steps: steps:
- name: Add Contributor Label - name: Add Contributor Label
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 uses: actions/github-script@v8
with: with:
script: | script: |
const isPR = !!context.payload.pull_request; const isPR = !!context.payload.pull_request;
+2 -2
View File
@@ -12,7 +12,7 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- name: Check PR standards - name: Check PR standards
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 uses: actions/github-script@v7
with: with:
script: | script: |
const pr = context.payload.pull_request; const pr = context.payload.pull_request;
@@ -159,7 +159,7 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- name: Check PR template compliance - name: Check PR template compliance
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 uses: actions/github-script@v7
with: with:
script: | script: |
const pr = context.payload.pull_request; const pr = context.payload.pull_request;
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
publish: publish:
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
steps: steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
publish: publish:
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
steps: steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
+38 -38
View File
@@ -35,7 +35,7 @@ jobs:
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.repository == 'anomalyco/opencode' if: github.repository == 'anomalyco/opencode'
steps: steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -72,7 +72,7 @@ jobs:
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.repository == 'anomalyco/opencode' if: github.repository == 'anomalyco/opencode'
steps: steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/checkout@v3
with: with:
fetch-tags: true fetch-tags: true
@@ -95,14 +95,14 @@ jobs:
GH_REPO: ${{ needs.version.outputs.repo }} GH_REPO: ${{ needs.version.outputs.repo }}
GH_TOKEN: ${{ steps.committer.outputs.token }} GH_TOKEN: ${{ steps.committer.outputs.token }}
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - uses: actions/upload-artifact@v4
with: with:
name: opencode-cli name: opencode-cli
path: | path: |
packages/opencode/dist/opencode-darwin* packages/opencode/dist/opencode-darwin*
packages/opencode/dist/opencode-linux* packages/opencode/dist/opencode-linux*
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - uses: actions/upload-artifact@v4
with: with:
name: opencode-cli-windows name: opencode-cli-windows
path: packages/opencode/dist/opencode-windows* path: packages/opencode/dist/opencode-windows*
@@ -123,9 +123,9 @@ jobs:
AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }} AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }}
AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }} AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }}
steps: steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/checkout@v3
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - uses: actions/download-artifact@v4
with: with:
name: opencode-cli-windows name: opencode-cli-windows
path: packages/opencode/dist path: packages/opencode/dist
@@ -138,13 +138,13 @@ jobs:
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
- name: Azure login - name: Azure login
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 uses: azure/login@v2
with: with:
client-id: ${{ env.AZURE_CLIENT_ID }} client-id: ${{ env.AZURE_CLIENT_ID }}
tenant-id: ${{ env.AZURE_TENANT_ID }} tenant-id: ${{ env.AZURE_TENANT_ID }}
subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }} subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }}
- uses: azure/artifact-signing-action@b443cf8ea4124818d2ea9f043cba29fc3ec47b16 # v1.2.0 - uses: azure/artifact-signing-action@v1
with: with:
endpoint: ${{ env.AZURE_TRUSTED_SIGNING_ENDPOINT }} endpoint: ${{ env.AZURE_TRUSTED_SIGNING_ENDPOINT }}
signing-account-name: ${{ env.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} signing-account-name: ${{ env.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
@@ -201,7 +201,7 @@ jobs:
--clobber ` --clobber `
--repo "${{ needs.version.outputs.repo }}" --repo "${{ needs.version.outputs.repo }}"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - uses: actions/upload-artifact@v4
with: with:
name: opencode-cli-signed-windows name: opencode-cli-signed-windows
path: | path: |
@@ -244,14 +244,14 @@ jobs:
- host: "blacksmith-4vcpu-ubuntu-2404" - host: "blacksmith-4vcpu-ubuntu-2404"
target: x86_64-unknown-linux-gnu target: x86_64-unknown-linux-gnu
platform_flag: --linux platform_flag: --linux
- host: "blacksmith-4vcpu-ubuntu-2404-arm" - host: "blacksmith-4vcpu-ubuntu-2404"
target: aarch64-unknown-linux-gnu target: aarch64-unknown-linux-gnu
platform_flag: --linux --arm64 platform_flag: --linux
runs-on: ${{ matrix.settings.host }} runs-on: ${{ matrix.settings.host }}
steps: steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/checkout@v3
- uses: apple-actions/import-codesign-certs@8f3fb608891dd2244cdab3d69cd68c0d37a7fe93 # v2.0.0 - uses: apple-actions/import-codesign-certs@v2
if: runner.os == 'macOS' if: runner.os == 'macOS'
with: with:
keychain: build keychain: build
@@ -268,19 +268,19 @@ jobs:
- name: Azure login - name: Azure login
if: runner.os == 'Windows' if: runner.os == 'Windows'
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 uses: azure/login@v2
with: with:
client-id: ${{ env.AZURE_CLIENT_ID }} client-id: ${{ env.AZURE_CLIENT_ID }}
tenant-id: ${{ env.AZURE_TENANT_ID }} tenant-id: ${{ env.AZURE_TENANT_ID }}
subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }} subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }}
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - uses: actions/setup-node@v4
with: with:
node-version: "24" node-version: "24"
- name: Cache apt packages - name: Cache apt packages
if: contains(matrix.settings.host, 'ubuntu') if: contains(matrix.settings.host, 'ubuntu')
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 uses: actions/cache@v4
with: with:
path: ~/apt-cache path: ~/apt-cache
key: ${{ runner.os }}-${{ matrix.settings.target }}-apt-electron-${{ hashFiles('.github/workflows/publish.yml') }} key: ${{ runner.os }}-${{ matrix.settings.target }}-apt-electron-${{ hashFiles('.github/workflows/publish.yml') }}
@@ -304,7 +304,7 @@ jobs:
- name: Prepare - name: Prepare
run: bun ./scripts/prepare.ts run: bun ./scripts/prepare.ts
working-directory: packages/desktop working-directory: packages/desktop-electron
env: env:
OPENCODE_VERSION: ${{ needs.version.outputs.version }} OPENCODE_VERSION: ${{ needs.version.outputs.version }}
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }} OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
@@ -315,7 +315,7 @@ jobs:
- name: Build - name: Build
run: bun run build run: bun run build
working-directory: packages/desktop working-directory: packages/desktop-electron
env: env:
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }} OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
@@ -329,7 +329,7 @@ jobs:
- name: Package and publish - name: Package and publish
if: needs.version.outputs.release if: needs.version.outputs.release
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish always --config electron-builder.config.ts run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish always --config electron-builder.config.ts
working-directory: packages/desktop working-directory: packages/desktop-electron
timeout-minutes: 60 timeout-minutes: 60
env: env:
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }} OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
@@ -343,14 +343,14 @@ jobs:
- name: Package (no publish) - name: Package (no publish)
if: ${{ !needs.version.outputs.release }} if: ${{ !needs.version.outputs.release }}
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish never --config electron-builder.config.ts run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish never --config electron-builder.config.ts
working-directory: packages/desktop working-directory: packages/desktop-electron
timeout-minutes: 60 timeout-minutes: 60
env: env:
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }} OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
- name: Create and upload macOS .app.tar.gz - name: Create and upload macOS .app.tar.gz
if: runner.os == 'macOS' && needs.version.outputs.release if: runner.os == 'macOS' && needs.version.outputs.release
working-directory: packages/desktop/dist working-directory: packages/desktop-electron/dist
env: env:
GH_TOKEN: ${{ steps.committer.outputs.token }} GH_TOKEN: ${{ steps.committer.outputs.token }}
run: | run: |
@@ -377,9 +377,9 @@ jobs:
shell: pwsh shell: pwsh
run: | run: |
$files = @() $files = @()
$files += Get-ChildItem "${{ github.workspace }}\packages\desktop\dist\*.exe" | Select-Object -ExpandProperty FullName $files += Get-ChildItem "${{ github.workspace }}\packages\desktop-electron\dist\*.exe" | Select-Object -ExpandProperty FullName
$files += Get-ChildItem "${{ github.workspace }}\packages\desktop\dist\*unpacked\*.exe" | Select-Object -ExpandProperty FullName $files += Get-ChildItem "${{ github.workspace }}\packages\desktop-electron\dist\*unpacked\*.exe" | Select-Object -ExpandProperty FullName
$files += Get-ChildItem "${{ github.workspace }}\packages\desktop\dist\*unpacked\resources\opencode-cli.exe" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName $files += Get-ChildItem "${{ github.workspace }}\packages\desktop-electron\dist\*unpacked\resources\opencode-cli.exe" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName
foreach ($file in $files | Select-Object -Unique) { foreach ($file in $files | Select-Object -Unique) {
$sig = Get-AuthenticodeSignature $file $sig = Get-AuthenticodeSignature $file
@@ -388,16 +388,16 @@ jobs:
} }
} }
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - uses: actions/upload-artifact@v4
with: with:
name: opencode-desktop-${{ matrix.settings.target }} name: opencode-desktop-${{ matrix.settings.target }}
path: packages/desktop/dist/* path: packages/desktop-electron/dist/*
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - uses: actions/upload-artifact@v4
if: needs.version.outputs.release if: needs.version.outputs.release
with: with:
name: latest-yml-${{ matrix.settings.target }} name: latest-yml-${{ matrix.settings.target }}
path: packages/desktop/dist/latest*.yml path: packages/desktop-electron/dist/latest*.yml
publish: publish:
needs: needs:
@@ -408,44 +408,44 @@ jobs:
if: always() && !failure() && !cancelled() if: always() && !failure() && !cancelled()
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
steps: steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/checkout@v3
- uses: ./.github/actions/setup-bun - uses: ./.github/actions/setup-bun
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 uses: docker/setup-buildx-action@v3
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - uses: actions/setup-node@v4
with: with:
node-version: "24" node-version: "24"
registry-url: "https://registry.npmjs.org" registry-url: "https://registry.npmjs.org"
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - uses: actions/download-artifact@v4
with: with:
name: opencode-cli name: opencode-cli
path: packages/opencode/dist path: packages/opencode/dist
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - uses: actions/download-artifact@v4
with: with:
name: opencode-cli-windows name: opencode-cli-windows
path: packages/opencode/dist path: packages/opencode/dist
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - uses: actions/download-artifact@v4
with: with:
name: opencode-cli-signed-windows name: opencode-cli-signed-windows
path: packages/opencode/dist path: packages/opencode/dist
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - uses: actions/download-artifact@v4
if: needs.version.outputs.release if: needs.version.outputs.release
with: with:
pattern: latest-yml-* pattern: latest-yml-*
@@ -459,7 +459,7 @@ jobs:
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
- name: Cache apt packages (AUR) - name: Cache apt packages (AUR)
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 uses: actions/cache@v4
with: with:
path: /var/cache/apt/archives path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-aur-${{ hashFiles('.github/workflows/publish.yml') }} key: ${{ runner.os }}-apt-aur-${{ hashFiles('.github/workflows/publish.yml') }}
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
release: release:
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
fi fi
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
with: with:
fetch-depth: 1 fetch-depth: 1
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
- name: Setup Bun - name: Setup Bun
uses: ./.github/actions/setup-bun uses: ./.github/actions/setup-bun
+1 -1
View File
@@ -29,7 +29,7 @@ jobs:
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
- name: Setup Bun - name: Setup Bun
uses: ./.github/actions/setup-bun uses: ./.github/actions/setup-bun
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
name: Release Zed Extension name: Release Zed Extension
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
+9 -14
View File
@@ -37,12 +37,12 @@ jobs:
shell: bash shell: bash
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node - name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@v4
with: with:
node-version: "24" node-version: "24"
@@ -55,7 +55,7 @@ jobs:
git config --global user.name "opencode" git config --global user.name "opencode"
- name: Cache Turbo - name: Cache Turbo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 uses: actions/cache@v4
with: with:
path: node_modules/.cache/turbo path: node_modules/.cache/turbo
key: turbo-${{ runner.os }}-${{ hashFiles('turbo.json', '**/package.json') }}-${{ github.sha }} key: turbo-${{ runner.os }}-${{ hashFiles('turbo.json', '**/package.json') }}-${{ github.sha }}
@@ -68,14 +68,9 @@ jobs:
env: env:
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: ${{ runner.os == 'Windows' && 'true' || 'false' }} OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: ${{ runner.os == 'Windows' && 'true' || 'false' }}
- name: Run HttpApi exerciser gates
if: runner.os == 'Linux'
working-directory: packages/opencode
run: bun run test:httpapi
- name: Publish unit reports - name: Publish unit reports
if: always() if: always()
uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6.4.0 uses: mikepenz/action-junit-report@v6
with: with:
report_paths: packages/*/.artifacts/unit/junit.xml report_paths: packages/*/.artifacts/unit/junit.xml
check_name: "unit results (${{ matrix.settings.name }})" check_name: "unit results (${{ matrix.settings.name }})"
@@ -85,7 +80,7 @@ jobs:
- name: Upload unit artifacts - name: Upload unit artifacts
if: always() if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@v4
with: with:
name: unit-${{ matrix.settings.name }}-${{ github.run_attempt }} name: unit-${{ matrix.settings.name }}-${{ github.run_attempt }}
include-hidden-files: true include-hidden-files: true
@@ -111,12 +106,12 @@ jobs:
shell: bash shell: bash
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node - name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@v4
with: with:
node-version: "24" node-version: "24"
@@ -131,7 +126,7 @@ jobs:
- name: Cache Playwright browsers - name: Cache Playwright browsers
id: playwright-cache id: playwright-cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 uses: actions/cache@v4
with: with:
path: ${{ github.workspace }}/.playwright-browsers path: ${{ github.workspace }}/.playwright-browsers
key: ${{ runner.os }}-${{ runner.arch }}-playwright-${{ steps.playwright-version.outputs.version }}-chromium key: ${{ runner.os }}-${{ runner.arch }}-playwright-${{ steps.playwright-version.outputs.version }}-chromium
@@ -155,7 +150,7 @@ jobs:
- name: Upload Playwright artifacts - name: Upload Playwright artifacts
if: always() if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@v4
with: with:
name: playwright-${{ matrix.settings.name }}-${{ github.run_attempt }} name: playwright-${{ matrix.settings.name }}-${{ github.run_attempt }}
if-no-files-found: ignore if-no-files-found: ignore
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
issues: write issues: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
with: with:
fetch-depth: 1 fetch-depth: 1
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@v4
- name: Setup Bun - name: Setup Bun
uses: ./.github/actions/setup-bun uses: ./.github/actions/setup-bun
-1
View File
@@ -3,7 +3,6 @@ node_modules
.worktrees .worktrees
.sst .sst
.env .env
.env.local
.idea .idea
.vscode .vscode
.codex .codex
-5
View File
@@ -1,5 +0,0 @@
# Fake secret-looking strings used by HTTP recorder redaction tests.
afa57acfda894e0ebf3c637dd710310b705c0a2f:packages/http-recorder/test/record-replay.test.ts:generic-api-key:69
afa57acfda894e0ebf3c637dd710310b705c0a2f:packages/http-recorder/test/record-replay.test.ts:generic-api-key:92
afa57acfda894e0ebf3c637dd710310b705c0a2f:packages/http-recorder/test/record-replay.test.ts:generic-api-key:146
afa57acfda894e0ebf3c637dd710310b705c0a2f:packages/http-recorder/test/record-replay.test.ts:gcp-api-key:71
+5 -1
View File
@@ -1,7 +1,11 @@
{ {
"$schema": "https://opencode.ai/config.json", "$schema": "https://opencode.ai/config.json",
"provider": {}, "provider": {},
"permission": {}, "permission": {
"edit": {
"packages/opencode/migration/*": "deny",
},
},
"mcp": {}, "mcp": {},
"tools": { "tools": {
"github-triage": false, "github-triage": false,
+285 -367
View File
@@ -1,62 +1,35 @@
/** @jsxImportSource @opentui/solid */ /** @jsxImportSource @opentui/solid */
import { useTerminalDimensions, type JSX } from "@opentui/solid" import { useKeyboard, useTerminalDimensions, type JSX } from "@opentui/solid"
import { useBindings, useKeymapSelector } from "@opentui/keymap/solid" import { RGBA, VignetteEffect } from "@opentui/core"
import { RGBA, VignetteEffect, type KeyEvent, type Renderable } from "@opentui/core" import type {
import { createBindingLookup, type BindingConfig } from "@opentui/keymap/extras" TuiKeybindSet,
import type { TuiPlugin, TuiPluginApi, TuiPluginMeta, TuiPluginModule, TuiSlotPlugin } from "@opencode-ai/plugin/tui" TuiPlugin,
TuiPluginApi,
TuiPluginMeta,
TuiPluginModule,
TuiSlotPlugin,
} from "@opencode-ai/plugin/tui"
const tabs = ["overview", "counter", "help"] const tabs = ["overview", "counter", "help"]
const command = { const bind = {
modal: "smoke_modal", modal: "ctrl+shift+m",
screen: "smoke_screen", screen: "ctrl+shift+o",
alert: "smoke_alert", home: "escape,ctrl+h",
confirm: "smoke_confirm", left: "left,h",
prompt: "smoke_prompt", right: "right,l",
select: "smoke_select", up: "up,k",
host: "smoke_host", down: "down,j",
home: "smoke_home", alert: "a",
toast: "smoke_toast", confirm: "c",
dialog_close: "smoke_dialog_close", prompt: "p",
local_push: "smoke_local_push", select: "s",
local_pop: "smoke_local_pop", modal_accept: "enter,return",
screen_home: "smoke_screen_home", modal_close: "escape",
screen_left: "smoke_screen_left", dialog_close: "escape",
screen_right: "smoke_screen_right", local: "x",
screen_up: "smoke_screen_up", local_push: "enter,return",
screen_down: "smoke_screen_down", local_close: "q,backspace",
screen_modal: "smoke_screen_modal", host: "z",
screen_local: "smoke_screen_local",
screen_host: "smoke_screen_host",
screen_alert: "smoke_screen_alert",
screen_confirm: "smoke_screen_confirm",
screen_prompt: "smoke_screen_prompt",
screen_select: "smoke_screen_select",
modal_accept: "smoke_modal_accept",
modal_close: "smoke_modal_close",
}
type SmokeBindings = BindingConfig<Renderable, KeyEvent>
const defaultKeymap = {
[command.modal]: "ctrl+shift+m",
[command.screen]: "ctrl+shift+o",
[command.dialog_close]: "escape",
[command.local_push]: "enter,return",
[command.local_pop]: "escape,q,backspace",
[command.screen_home]: "escape,ctrl+h",
[command.screen_left]: "left,h",
[command.screen_right]: "right,l",
[command.screen_up]: "up,k",
[command.screen_down]: "down,j",
[command.screen_modal]: "ctrl+shift+m",
[command.screen_local]: "x",
[command.screen_host]: "z",
[command.screen_alert]: "a",
[command.screen_confirm]: "c",
[command.screen_prompt]: "p",
[command.screen_select]: "s",
[command.modal_accept]: "enter,return",
[command.modal_close]: "escape",
} }
const pick = (value: unknown, fallback: string) => { const pick = (value: unknown, fallback: string) => {
@@ -70,14 +43,16 @@ const num = (value: unknown, fallback: number) => {
return value return value
} }
const record = (value: unknown): value is Record<string, unknown> => const rec = (value: unknown) => {
!!value && typeof value === "object" && !Array.isArray(value) if (!value || typeof value !== "object" || Array.isArray(value)) return
return Object.fromEntries(Object.entries(value))
}
type Cfg = { type Cfg = {
label: string label: string
route: string route: string
vignette: number vignette: number
keybinds: SmokeBindings | undefined keybinds: Record<string, unknown> | undefined
} }
type Route = { type Route = {
@@ -99,7 +74,7 @@ const cfg = (options: Record<string, unknown> | undefined) => {
label: pick(options?.label, "smoke"), label: pick(options?.label, "smoke"),
route: pick(options?.route, "workspace-smoke"), route: pick(options?.route, "workspace-smoke"),
vignette: Math.max(0, num(options?.vignette, 0.35)), vignette: Math.max(0, num(options?.vignette, 0.35)),
keybinds: record(options?.keybinds) ? (options.keybinds as SmokeBindings) : undefined, keybinds: rec(options?.keybinds),
} }
} }
@@ -110,12 +85,7 @@ const names = (input: Cfg) => {
} }
} }
function createKeys(input: SmokeBindings | undefined) { type Keys = TuiKeybindSet
return createBindingLookup({ ...defaultKeymap, ...input })
}
type Keys = ReturnType<typeof createKeys>
const ui = { const ui = {
panel: "#1d1d1d", panel: "#1d1d1d",
border: "#4a4a4a", border: "#4a4a4a",
@@ -322,174 +292,125 @@ const Screen = (props: {
} }
const pop = (base?: State) => { const pop = (base?: State) => {
const next = base ?? current(props.api, props.route) const next = base ?? current(props.api, props.route)
set(Math.max(0, next.local - 1), next) const local = Math.max(0, next.local - 1)
set(local, next)
} }
const show = () => { const show = () => {
setTimeout(() => { setTimeout(() => {
open() open()
}, 0) }, 0)
} }
const screenActive = () => props.api.route.current.name === props.route.screen useKeyboard((evt) => {
if (props.api.route.current.name !== props.route.screen) return
const next = current(props.api, props.route)
if (props.api.ui.dialog.open) {
if (props.keys.match("dialog_close", evt)) {
evt.preventDefault()
evt.stopPropagation()
props.api.ui.dialog.clear()
return
}
return
}
useBindings(() => ({ if (next.local > 0) {
enabled: () => screenActive() && props.api.ui.dialog.open, if (evt.name === "escape" || props.keys.match("local_close", evt)) {
commands: [ evt.preventDefault()
{ evt.stopPropagation()
name: command.dialog_close, pop(next)
run() { return
props.api.ui.dialog.clear() }
},
},
],
bindings: props.keys.gather("smoke.dialog", [command.dialog_close]),
}))
useBindings(() => ({ if (props.keys.match("local_push", evt)) {
enabled: () => screenActive() && !props.api.ui.dialog.open && current(props.api, props.route).local > 0, evt.preventDefault()
commands: [ evt.stopPropagation()
{ push(next)
name: command.local_push, return
run() { }
push(current(props.api, props.route)) return
}, }
},
{
name: command.local_pop,
run() {
pop(current(props.api, props.route))
},
},
],
bindings: props.keys.gather("smoke.local", [command.local_push, command.local_pop]),
}))
useBindings(() => ({ if (props.keys.match("home", evt)) {
enabled: () => screenActive() && !props.api.ui.dialog.open && current(props.api, props.route).local === 0, evt.preventDefault()
commands: [ evt.stopPropagation()
{ props.api.route.navigate("home")
name: command.screen_home, return
run() { }
props.api.route.navigate("home")
},
},
{
name: command.screen_left,
run() {
const next = current(props.api, props.route)
props.api.route.navigate(props.route.screen, { ...next, tab: (next.tab - 1 + tabs.length) % tabs.length })
},
},
{
name: command.screen_right,
run() {
const next = current(props.api, props.route)
props.api.route.navigate(props.route.screen, { ...next, tab: (next.tab + 1) % tabs.length })
},
},
{
name: command.screen_up,
run() {
const next = current(props.api, props.route)
props.api.route.navigate(props.route.screen, { ...next, count: next.count + 1 })
},
},
{
name: command.screen_down,
run() {
const next = current(props.api, props.route)
props.api.route.navigate(props.route.screen, { ...next, count: next.count - 1 })
},
},
{
name: command.screen_modal,
run() {
props.api.route.navigate(props.route.modal, current(props.api, props.route))
},
},
{
name: command.screen_local,
run() {
open()
},
},
{
name: command.screen_host,
run() {
host(props.api, props.input, skin)
},
},
{
name: command.screen_alert,
run() {
warn(props.api, props.route, current(props.api, props.route))
},
},
{
name: command.screen_confirm,
run() {
check(props.api, props.route, current(props.api, props.route))
},
},
{
name: command.screen_prompt,
run() {
entry(props.api, props.route, current(props.api, props.route))
},
},
{
name: command.screen_select,
run() {
picker(props.api, props.route, current(props.api, props.route))
},
},
],
bindings: props.keys.gather("smoke.screen", [
command.screen_home,
command.screen_left,
command.screen_right,
command.screen_up,
command.screen_down,
command.screen_modal,
command.screen_local,
command.screen_host,
command.screen_alert,
command.screen_confirm,
command.screen_prompt,
command.screen_select,
]),
}))
const shortcuts = useKeymapSelector((keymap) => {
const bindings = keymap.getCommandBindings({
visibility: "registered",
commands: [
command.screen_home,
command.screen_up,
command.screen_down,
command.screen_modal,
command.screen_alert,
command.screen_confirm,
command.screen_prompt,
command.screen_select,
command.screen_local,
command.screen_host,
command.local_push,
command.local_pop,
],
})
return { if (props.keys.match("left", evt)) {
screen_home: props.api.keys.formatBindings(bindings.get(command.screen_home)) ?? "", evt.preventDefault()
screen_up: props.api.keys.formatBindings(bindings.get(command.screen_up)) ?? "", evt.stopPropagation()
screen_down: props.api.keys.formatBindings(bindings.get(command.screen_down)) ?? "", props.api.route.navigate(props.route.screen, { ...next, tab: (next.tab - 1 + tabs.length) % tabs.length })
screen_modal: props.api.keys.formatBindings(bindings.get(command.screen_modal)) ?? "", return
screen_alert: props.api.keys.formatBindings(bindings.get(command.screen_alert)) ?? "", }
screen_confirm: props.api.keys.formatBindings(bindings.get(command.screen_confirm)) ?? "",
screen_prompt: props.api.keys.formatBindings(bindings.get(command.screen_prompt)) ?? "", if (props.keys.match("right", evt)) {
screen_select: props.api.keys.formatBindings(bindings.get(command.screen_select)) ?? "", evt.preventDefault()
screen_local: props.api.keys.formatBindings(bindings.get(command.screen_local)) ?? "", evt.stopPropagation()
screen_host: props.api.keys.formatBindings(bindings.get(command.screen_host)) ?? "", props.api.route.navigate(props.route.screen, { ...next, tab: (next.tab + 1) % tabs.length })
local_push: props.api.keys.formatBindings(bindings.get(command.local_push)) ?? "", return
local_pop: props.api.keys.formatBindings(bindings.get(command.local_pop)) ?? "", }
if (props.keys.match("up", evt)) {
evt.preventDefault()
evt.stopPropagation()
props.api.route.navigate(props.route.screen, { ...next, count: next.count + 1 })
return
}
if (props.keys.match("down", evt)) {
evt.preventDefault()
evt.stopPropagation()
props.api.route.navigate(props.route.screen, { ...next, count: next.count - 1 })
return
}
if (props.keys.match("modal", evt)) {
evt.preventDefault()
evt.stopPropagation()
props.api.route.navigate(props.route.modal, next)
return
}
if (props.keys.match("local", evt)) {
evt.preventDefault()
evt.stopPropagation()
open()
return
}
if (props.keys.match("host", evt)) {
evt.preventDefault()
evt.stopPropagation()
host(props.api, props.input, skin)
return
}
if (props.keys.match("alert", evt)) {
evt.preventDefault()
evt.stopPropagation()
warn(props.api, props.route, next)
return
}
if (props.keys.match("confirm", evt)) {
evt.preventDefault()
evt.stopPropagation()
check(props.api, props.route, next)
return
}
if (props.keys.match("prompt", evt)) {
evt.preventDefault()
evt.stopPropagation()
entry(props.api, props.route, next)
return
}
if (props.keys.match("select", evt)) {
evt.preventDefault()
evt.stopPropagation()
picker(props.api, props.route, next)
} }
}) })
@@ -509,7 +430,7 @@ const Screen = (props: {
<b>{props.input.label} screen</b> <b>{props.input.label} screen</b>
<span style={{ fg: skin.muted }}> plugin route</span> <span style={{ fg: skin.muted }}> plugin route</span>
</text> </text>
<text fg={skin.muted}>{shortcuts().screen_home} home</text> <text fg={skin.muted}>{props.keys.print("home")} home</text>
</box> </box>
<box flexDirection="row" gap={1} paddingBottom={1}> <box flexDirection="row" gap={1} paddingBottom={1}>
@@ -556,7 +477,7 @@ const Screen = (props: {
<box flexDirection="column" gap={1}> <box flexDirection="column" gap={1}>
<text fg={skin.text}>Counter: {value.count}</text> <text fg={skin.text}>Counter: {value.count}</text>
<text fg={skin.muted}> <text fg={skin.muted}>
{shortcuts().screen_up} / {shortcuts().screen_down} change value {props.keys.print("up")} / {props.keys.print("down")} change value
</text> </text>
</box> </box>
) : null} ) : null}
@@ -564,16 +485,17 @@ const Screen = (props: {
{value.tab === 2 ? ( {value.tab === 2 ? (
<box flexDirection="column" gap={1}> <box flexDirection="column" gap={1}>
<text fg={skin.muted}> <text fg={skin.muted}>
{shortcuts().screen_modal} modal | {shortcuts().screen_alert} alert | {shortcuts().screen_confirm}{" "} {props.keys.print("modal")} modal | {props.keys.print("alert")} alert | {props.keys.print("confirm")}{" "}
confirm | {shortcuts().screen_prompt} prompt | {shortcuts().screen_select} select confirm | {props.keys.print("prompt")} prompt | {props.keys.print("select")} select
</text> </text>
<text fg={skin.muted}> <text fg={skin.muted}>
{shortcuts().screen_local} local stack | {shortcuts().screen_host} host stack {props.keys.print("local")} local stack | {props.keys.print("host")} host stack
</text> </text>
<text fg={skin.muted}> <text fg={skin.muted}>
local open: {shortcuts().local_push} push nested · {shortcuts().local_pop} close local open: {props.keys.print("local_push")} push nested · esc or {props.keys.print("local_close")}{" "}
close
</text> </text>
<text fg={skin.muted}>{shortcuts().screen_home} returns home</text> <text fg={skin.muted}>{props.keys.print("home")} returns home</text>
</box> </box>
) : null} ) : null}
</box> </box>
@@ -626,7 +548,7 @@ const Screen = (props: {
</text> </text>
<text fg={skin.muted}>Plugin-owned stack depth: {value.local}</text> <text fg={skin.muted}>Plugin-owned stack depth: {value.local}</text>
<text fg={skin.muted}> <text fg={skin.muted}>
{shortcuts().local_push} push nested · {shortcuts().local_pop} pop/close {props.keys.print("local_push")} push nested · {props.keys.print("local_close")} pop/close
</text> </text>
<box flexDirection="row" gap={1}> <box flexDirection="row" gap={1}>
<Btn txt="push" run={push} skin={skin} on /> <Btn txt="push" run={push} skin={skin} on />
@@ -649,35 +571,20 @@ const Modal = (props: {
const value = parse(props.params) const value = parse(props.params)
const skin = tone(props.api) const skin = tone(props.api)
useBindings(() => ({ useKeyboard((evt) => {
enabled: () => props.api.route.current.name === props.route.modal, if (props.api.route.current.name !== props.route.modal) return
commands: [
{
name: command.modal_accept,
run() {
props.api.route.navigate(props.route.screen, { ...parse(props.params), source: "modal" })
},
},
{
name: command.modal_close,
run() {
props.api.route.navigate("home")
},
},
],
bindings: props.keys.gather("smoke.modal", [command.modal_accept, command.modal_close]),
}))
const shortcuts = useKeymapSelector((keymap) => {
const bindings = keymap.getCommandBindings({
visibility: "registered",
commands: [command.modal, command.screen, command.modal_accept, command.modal_close],
})
return { if (props.keys.match("modal_accept", evt)) {
modal: props.api.keys.formatBindings(bindings.get(command.modal)) ?? "", evt.preventDefault()
screen: props.api.keys.formatBindings(bindings.get(command.screen)) ?? "", evt.stopPropagation()
modal_accept: props.api.keys.formatBindings(bindings.get(command.modal_accept)) ?? "", props.api.route.navigate(props.route.screen, { ...value, source: "modal" })
modal_close: props.api.keys.formatBindings(bindings.get(command.modal_close)) ?? "", return
}
if (props.keys.match("modal_close", evt)) {
evt.preventDefault()
evt.stopPropagation()
props.api.route.navigate("home")
} }
}) })
@@ -688,10 +595,10 @@ const Modal = (props: {
<text fg={skin.text}> <text fg={skin.text}>
<b>{props.input.label} modal</b> <b>{props.input.label} modal</b>
</text> </text>
<text fg={skin.muted}>{shortcuts().modal} modal command</text> <text fg={skin.muted}>{props.keys.print("modal")} modal command</text>
<text fg={skin.muted}>{shortcuts().screen} screen command</text> <text fg={skin.muted}>{props.keys.print("screen")} screen command</text>
<text fg={skin.muted}> <text fg={skin.muted}>
{shortcuts().modal_accept} opens screen · {shortcuts().modal_close} closes {props.keys.print("modal_accept")} opens screen · {props.keys.print("modal_close")} closes
</text> </text>
<box flexDirection="row" gap={1}> <box flexDirection="row" gap={1}>
<Btn <Btn
@@ -744,8 +651,25 @@ const home = (api: TuiPluginApi, input: Cfg) => ({
}, },
home_prompt(ctx, value) { home_prompt(ctx, value) {
const skin = look(ctx.theme.current) const skin = look(ctx.theme.current)
const Prompt = api.ui.Prompt type Prompt = (props: {
const Slot = api.ui.Slot workspaceID?: string
visible?: boolean
disabled?: boolean
onSubmit?: () => void
hint?: JSX.Element
right?: JSX.Element
showPlaceholder?: boolean
placeholders?: {
normal?: string[]
shell?: string[]
}
}) => JSX.Element
type Slot = (
props: { name: string; mode?: unknown; children?: JSX.Element } & Record<string, unknown>,
) => JSX.Element | null
const ui = api.ui as TuiPluginApi["ui"] & { Prompt: Prompt; Slot: Slot }
const Prompt = ui.Prompt
const Slot = ui.Slot
const normal = [ const normal = [
`[SMOKE] route check for ${input.label}`, `[SMOKE] route check for ${input.label}`,
"[SMOKE] confirm home_prompt slot override", "[SMOKE] confirm home_prompt slot override",
@@ -867,115 +791,109 @@ const slot = (api: TuiPluginApi, input: Cfg): TuiSlotPlugin[] => [
const reg = (api: TuiPluginApi, input: Cfg, keys: Keys) => { const reg = (api: TuiPluginApi, input: Cfg, keys: Keys) => {
const route = names(input) const route = names(input)
api.keymap.registerLayer({ api.command.register(() => [
commands: [ {
{ title: `${input.label} modal`,
name: command.modal, value: "plugin.smoke.modal",
title: `${input.label} modal`, keybind: keys.get("modal"),
category: "Plugin", category: "Plugin",
namespace: "palette", slash: {
slashName: "smoke", name: "smoke",
run() {
api.route.navigate(route.modal, { source: "command" })
},
}, },
{ onSelect: () => {
name: command.screen, api.route.navigate(route.modal, { source: "command" })
title: `${input.label} screen`,
category: "Plugin",
namespace: "palette",
slashName: "smoke-screen",
run() {
api.route.navigate(route.screen, { source: "command", tab: 0, count: 0 })
},
}, },
{ },
name: command.alert, {
title: `${input.label} alert dialog`, title: `${input.label} screen`,
category: "Plugin", value: "plugin.smoke.screen",
namespace: "palette", keybind: keys.get("screen"),
slashName: "smoke-alert", category: "Plugin",
run() { slash: {
warn(api, route, current(api, route)) name: "smoke-screen",
},
}, },
{ onSelect: () => {
name: command.confirm, api.route.navigate(route.screen, { source: "command", tab: 0, count: 0 })
title: `${input.label} confirm dialog`,
category: "Plugin",
namespace: "palette",
slashName: "smoke-confirm",
run() {
check(api, route, current(api, route))
},
}, },
{ },
name: command.prompt, {
title: `${input.label} prompt dialog`, title: `${input.label} alert dialog`,
category: "Plugin", value: "plugin.smoke.alert",
namespace: "palette", category: "Plugin",
slashName: "smoke-prompt", slash: {
run() { name: "smoke-alert",
entry(api, route, current(api, route))
},
}, },
{ onSelect: () => {
name: command.select, warn(api, route, current(api, route))
title: `${input.label} select dialog`,
category: "Plugin",
namespace: "palette",
slashName: "smoke-select",
run() {
picker(api, route, current(api, route))
},
}, },
{ },
name: command.host, {
title: `${input.label} host overlay`, title: `${input.label} confirm dialog`,
category: "Plugin", value: "plugin.smoke.confirm",
namespace: "palette", category: "Plugin",
slashName: "smoke-host", slash: {
run() { name: "smoke-confirm",
host(api, input, tone(api))
},
}, },
{ onSelect: () => {
name: command.home, check(api, route, current(api, route))
title: `${input.label} go home`,
category: "Plugin",
namespace: "palette",
enabled: () => api.route.current.name !== "home",
run() {
api.route.navigate("home")
},
}, },
{ },
name: command.toast, {
title: `${input.label} toast`, title: `${input.label} prompt dialog`,
category: "Plugin", value: "plugin.smoke.prompt",
namespace: "palette", category: "Plugin",
run() { slash: {
api.ui.toast({ name: "smoke-prompt",
variant: "info",
title: "Smoke",
message: "Plugin toast works",
duration: 2000,
})
},
}, },
], onSelect: () => {
bindings: keys.gather("smoke.global", [ entry(api, route, current(api, route))
command.modal, },
command.screen, },
command.alert, {
command.confirm, title: `${input.label} select dialog`,
command.prompt, value: "plugin.smoke.select",
command.select, category: "Plugin",
command.host, slash: {
command.home, name: "smoke-select",
command.toast, },
]), onSelect: () => {
}) picker(api, route, current(api, route))
},
},
{
title: `${input.label} host overlay`,
value: "plugin.smoke.host",
category: "Plugin",
slash: {
name: "smoke-host",
},
onSelect: () => {
host(api, input, tone(api))
},
},
{
title: `${input.label} go home`,
value: "plugin.smoke.home",
category: "Plugin",
enabled: api.route.current.name !== "home",
onSelect: () => {
api.route.navigate("home")
},
},
{
title: `${input.label} toast`,
value: "plugin.smoke.toast",
category: "Plugin",
onSelect: () => {
api.ui.toast({
variant: "info",
title: "Smoke",
message: "Plugin toast works",
duration: 2000,
})
},
},
])
} }
const tui: TuiPlugin = async (api, options, meta) => { const tui: TuiPlugin = async (api, options, meta) => {
@@ -984,9 +902,9 @@ const tui: TuiPlugin = async (api, options, meta) => {
await api.theme.install("./smoke-theme.json") await api.theme.install("./smoke-theme.json")
api.theme.set("smoke-theme") api.theme.set("smoke-theme")
const value = cfg(options) const value = cfg(options ?? undefined)
const route = names(value) const route = names(value)
const keys = createKeys(value.keybinds) const keys = api.keybind.create(bind, value.keybinds)
const fx = new VignetteEffect(value.vignette) const fx = new VignetteEffect(value.vignette)
const post = fx.apply.bind(fx) const post = fx.apply.bind(fx)
api.renderer.addPostProcessFn(post) api.renderer.addPostProcessFn(post)
@@ -1,37 +0,0 @@
# Deepening
How to deepen a cluster of shallow modules safely, given its dependencies. Assumes the vocabulary in [LANGUAGE.md](LANGUAGE.md) — **module**, **interface**, **seam**, **adapter**.
## Dependency categories
When assessing a candidate for deepening, classify its dependencies. The category determines how the deepened module is tested across its seam.
### 1. In-process
Pure computation, in-memory state, no I/O. Always deepenable — merge the modules and test through the new interface directly. No adapter needed.
### 2. Local-substitutable
Dependencies that have local test stand-ins (PGLite for Postgres, in-memory filesystem). Deepenable if the stand-in exists. The deepened module is tested with the stand-in running in the test suite. The seam is internal; no port at the module's external interface.
### 3. Remote but owned (Ports & Adapters)
Your own services across a network boundary (microservices, internal APIs). Define a **port** (interface) at the seam. The deep module owns the logic; the transport is injected as an **adapter**. Tests use an in-memory adapter. Production uses an HTTP/gRPC/queue adapter.
Recommendation shape: _"Define a port at the seam, implement an HTTP adapter for production and an in-memory adapter for testing, so the logic sits in one deep module even though it's deployed across a network."_
### 4. True external (Mock)
Third-party services (Stripe, Twilio, etc.) you don't control. The deepened module takes the external dependency as an injected port; tests provide a mock adapter.
## Seam discipline
- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a port unless at least two adapters are justified (typically production + test). A single-adapter seam is just indirection.
- **Internal seams vs external seams.** A deep module can have internal seams (private to its implementation, used by its own tests) as well as the external seam at its interface. Don't expose internal seams through the interface just because tests use them.
## Testing strategy: replace, don't layer
- Old unit tests on shallow modules become waste once tests at the deepened module's interface exist — delete them.
- Write new tests at the deepened module's interface. The **interface is the test surface**.
- Tests assert on observable outcomes through the interface, not internal state.
- Tests should survive internal refactors — they describe behaviour, not implementation. If a test has to change when the implementation changes, it's testing past the interface.
@@ -1,44 +0,0 @@
# Interface Design
When the user wants to explore alternative interfaces for a chosen deepening candidate, use this parallel sub-agent pattern. Based on "Design It Twice" (Ousterhout) — your first idea is unlikely to be the best.
Uses the vocabulary in [LANGUAGE.md](LANGUAGE.md) — **module**, **interface**, **seam**, **adapter**, **leverage**.
## Process
### 1. Frame the problem space
Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate:
- The constraints any new interface would need to satisfy
- The dependencies it would rely on, and which category they fall into (see [DEEPENING.md](DEEPENING.md))
- A rough illustrative code sketch to ground the constraints — not a proposal, just a way to make the constraints concrete
Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.
### 2. Spawn sub-agents
Spawn 3+ sub-agents in parallel using the Agent tool. Each must produce a **radically different** interface for the deepened module.
Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
- Agent 1: "Minimize the interface — aim for 13 entry points max. Maximise leverage per entry point."
- Agent 2: "Maximise flexibility — support many use cases and extension."
- Agent 3: "Optimise for the most common caller — make the default case trivial."
- Agent 4 (if applicable): "Design around ports & adapters for cross-seam dependencies."
Include both [LANGUAGE.md](LANGUAGE.md) vocabulary and CONTEXT.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.
Each sub-agent outputs:
1. Interface (types, methods, params — plus invariants, ordering, error modes)
2. Usage example showing how callers use it
3. What the implementation hides behind the seam
4. Dependency strategy and adapters (see [DEEPENING.md](DEEPENING.md))
5. Trade-offs — where leverage is high, where it's thin
### 3. Present and compare
Present designs sequentially so the user can absorb each one, then compare them in prose. Contrast by **depth** (leverage at the interface), **locality** (where change concentrates), and **seam placement**.
After comparing, give your own recommendation: which design you think is strongest and why. If elements from different designs would combine well, propose a hybrid. Be opinionated — the user wants a strong read, not a menu.
@@ -1,53 +0,0 @@
# Language
Shared vocabulary for every suggestion this skill makes. Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.
## Terms
**Module**
Anything with an interface and an implementation. Deliberately scale-agnostic — applies equally to a function, class, package, or tier-spanning slice.
_Avoid_: unit, component, service.
**Interface**
Everything a caller must know to use the module correctly. Includes the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics.
_Avoid_: API, signature (too narrow — those refer only to the type-level surface).
**Implementation**
What's inside a module — its body of code. Distinct from **Adapter**: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for "adapter" when the seam is the topic; "implementation" otherwise.
**Depth**
Leverage at the interface — the amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is **deep** when a large amount of behaviour sits behind a small interface. A module is **shallow** when the interface is nearly as complex as the implementation.
**Seam** _(from Michael Feathers)_
A place where you can alter behaviour without editing in that place. The _location_ at which a module's interface lives. Choosing where to put the seam is its own design decision, distinct from what goes behind it.
_Avoid_: boundary (overloaded with DDD's bounded context).
**Adapter**
A concrete thing that satisfies an interface at a seam. Describes _role_ (what slot it fills), not substance (what's inside).
**Leverage**
What callers get from depth. More capability per unit of interface they have to learn. One implementation pays back across N call sites and M tests.
**Locality**
What maintainers get from depth. Change, bugs, knowledge, and verification concentrate at one place rather than spreading across callers. Fix once, fixed everywhere.
## Principles
- **Depth is a property of the interface, not the implementation.** A deep module can be internally composed of small, mockable, swappable parts — they just aren't part of the interface. A module can have **internal seams** (private to its implementation, used by its own tests) as well as the **external seam** at its interface.
- **The deletion test.** Imagine deleting the module. If complexity vanishes, the module wasn't hiding anything (it was a pass-through). If complexity reappears across N callers, the module was earning its keep.
- **The interface is the test surface.** Callers and tests cross the same seam. If you want to test _past_ the interface, the module is probably the wrong shape.
- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a seam unless something actually varies across it.
## Relationships
- A **Module** has exactly one **Interface** (the surface it presents to callers and tests).
- **Depth** is a property of a **Module**, measured against its **Interface**.
- A **Seam** is where a **Module**'s **Interface** lives.
- An **Adapter** sits at a **Seam** and satisfies the **Interface**.
- **Depth** produces **Leverage** for callers and **Locality** for maintainers.
## Rejected framings
- **Depth as ratio of implementation-lines to interface-lines** (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead.
- **"Interface" as the TypeScript `interface` keyword or a class's public methods**: too narrow — interface here includes every fact a caller must know.
- **"Boundary"**: overloaded with DDD's bounded context. Say **seam** or **interface**.
@@ -1,71 +0,0 @@
---
name: improve-codebase-architecture
description: Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.
---
# Improve Codebase Architecture
Surface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
## Glossary
Use these terms exactly in every suggestion. Consistent language is the point — don't drift into "component," "service," "API," or "boundary." Full definitions in [LANGUAGE.md](LANGUAGE.md).
- **Module** — anything with an interface and an implementation (function, class, package, slice).
- **Interface** — everything a caller must know to use the module: types, invariants, error modes, ordering, config. Not just the type signature.
- **Implementation** — the code inside.
- **Depth** — leverage at the interface: a lot of behaviour behind a small interface. **Deep** = high leverage. **Shallow** = interface nearly as complex as the implementation.
- **Seam** — where an interface lives; a place behaviour can be altered without editing in place. (Use this, not "boundary.")
- **Adapter** — a concrete thing satisfying an interface at a seam.
- **Leverage** — what callers get from depth.
- **Locality** — what maintainers get from depth: change, bugs, knowledge concentrated in one place.
Key principles (see [LANGUAGE.md](LANGUAGE.md) for the full list):
- **Deletion test**: imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
- **The interface is the test surface.**
- **One adapter = hypothetical seam. Two adapters = real seam.**
This skill is _informed_ by the project's domain model. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate.
## Process
### 1. Explore
Read the project's domain glossary and any ADRs in the area you're touching first.
Then use the Agent tool with `subagent_type=Explore` to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:
- Where does understanding one concept require bouncing between many small modules?
- Where are modules **shallow** — interface nearly as complex as the implementation?
- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?
- Where do tightly-coupled modules leak across their seams?
- Which parts of the codebase are untested, or hard to test through their current interface?
Apply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.
### 2. Present candidates
Present a numbered list of deepening opportunities. For each candidate:
- **Files** — which files/modules are involved
- **Problem** — why the current architecture is causing friction
- **Solution** — plain English description of what would change
- **Benefits** — explained in terms of locality and leverage, and also in how tests would improve
**Use CONTEXT.md vocabulary for the domain, and [LANGUAGE.md](LANGUAGE.md) vocabulary for the architecture.** If `CONTEXT.md` defines "Order," talk about "the Order intake module" — not "the FooBarHandler," and not "the Order service."
**ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly (e.g. _"contradicts ADR-0007 — but worth reopening because…"_). Don't list every theoretical refactor an ADR forbids.
Do NOT propose interfaces yet. Ask the user: "Which of these would you like to explore?"
### 3. Grilling loop
Once the user picks a candidate, drop into a grilling conversation. Walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
Side effects happen inline as decisions crystallize:
- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md` — same discipline as `/grill-with-docs` (see [CONTEXT-FORMAT.md](../grill-with-docs/CONTEXT-FORMAT.md)). Create the file lazily if it doesn't exist.
- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.
- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons ("not worth it right now") and self-evident ones. See [ADR-FORMAT.md](../grill-with-docs/ADR-FORMAT.md).
- **Want to explore alternative interfaces for the deepened module?** See [INTERFACE-DESIGN.md](INTERFACE-DESIGN.md).
+4 -5
View File
@@ -7,11 +7,10 @@
"enabled": false, "enabled": false,
"label": "workspace", "label": "workspace",
"keybinds": { "keybinds": {
"smoke_modal": "ctrl+alt+m", "modal": "ctrl+alt+m",
"smoke_screen": "ctrl+alt+o", "screen": "ctrl+alt+o",
"smoke_screen_home": "escape,ctrl+shift+h", "home": "escape,ctrl+shift+h",
"smoke_screen_modal": "ctrl+alt+m", "dialog_close": "escape,q"
"smoke_dialog_close": "escape,q"
} }
} }
] ]
-24
View File
@@ -9,7 +9,6 @@
### General Principles ### General Principles
- Keep things in one function unless composable or reusable - Keep things in one function unless composable or reusable
- Do not extract single-use helpers preemptively. Inline the logic at the call site unless the helper is reused, hides a genuinely complex boundary, or has a clear independent name that improves the caller.
- Avoid `try`/`catch` where possible - Avoid `try`/`catch` where possible
- Avoid using the `any` type - Avoid using the `any` type
- Use Bun APIs when possible, like `Bun.file()` - Use Bun APIs when possible, like `Bun.file()`
@@ -73,29 +72,6 @@ function foo() {
} }
``` ```
### Complex Logic
When a function has several validation branches or supporting details, make the main function read as the happy path and move supporting details into small helpers below it.
```ts
// Good
export function loadThing(input: unknown) {
const config = requireConfig(input)
const metadata = readMetadata(input)
return createThing({ config, metadata })
}
function requireConfig(input: unknown) {
...
}
```
- Keep helpers close to the code they support, below the main export when that improves readability.
- Do not over-abstract simple expressions into many single-use helpers; extract only when it names a real concept like `requireConfig` or `readMetadata`.
- Do not return `Effect` from helpers unless they actually perform effectful work. Synchronous parsing, validation, and option building should stay synchronous.
- Prefer Effect schema helpers such as `Schema.UnknownFromJsonString` and `Schema.decodeUnknownOption` over manual `JSON.parse` wrapped in `Effect.try` when parsing untrusted JSON strings.
- Add comments for non-obvious constraints and surprising behavior, not for obvious assignments or control flow.
### Schema Definitions (Drizzle) ### Schema Definitions (Drizzle)
Use snake_case for field names so column names don't need to be redefined as strings. Use snake_case for field names so column names don't need to be redefined as strings.
+18 -6
View File
@@ -73,7 +73,7 @@ Replace `<platform>` with your platform (e.g., `darwin-arm64`, `linux-x64`).
- `packages/opencode`: OpenCode core business logic & server. - `packages/opencode`: OpenCode core business logic & server.
- `packages/opencode/src/cli/cmd/tui/`: The TUI code, written in SolidJS with [opentui](https://github.com/sst/opentui) - `packages/opencode/src/cli/cmd/tui/`: The TUI code, written in SolidJS with [opentui](https://github.com/sst/opentui)
- `packages/app`: The shared web UI components, written in SolidJS - `packages/app`: The shared web UI components, written in SolidJS
- `packages/desktop`: The native desktop app, built with Electron (wraps `packages/app`) - `packages/desktop`: The native desktop app, built with Tauri (wraps `packages/app`)
- `packages/plugin`: Source for `@opencode-ai/plugin` - `packages/plugin`: Source for `@opencode-ai/plugin`
### Understanding bun dev vs opencode ### Understanding bun dev vs opencode
@@ -123,21 +123,33 @@ This starts a local dev server at http://localhost:5173 (or similar port shown i
### Running the Desktop App ### Running the Desktop App
The desktop app is an Electron application that wraps the web UI. The desktop app is a native Tauri application that wraps the web UI.
To run the desktop app in development: To run the native desktop app:
```bash
bun run --cwd packages/desktop tauri dev
```
This starts the web dev server on http://localhost:1420 and opens the native window.
If you only want the web dev server (no native shell):
```bash ```bash
bun run --cwd packages/desktop dev bun run --cwd packages/desktop dev
``` ```
To create a production build and package the app: To create a production `dist/` and build the native app bundle:
```bash ```bash
bun run --cwd packages/desktop build bun run --cwd packages/desktop tauri build
bun run --cwd packages/desktop package
``` ```
This runs `bun run --cwd packages/desktop build` automatically via Tauris `beforeBuildCommand`.
> [!NOTE]
> Running the desktop app requires additional Tauri dependencies (Rust toolchain, platform-specific libraries). See the [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/) for setup instructions.
> [!NOTE] > [!NOTE]
> If you make changes to the API or SDK (e.g. `packages/opencode/src/server/server.ts`), run `./script/generate.ts` to regenerate the SDK and related files. > If you make changes to the API or SDK (e.g. `packages/opencode/src/server/server.ts`), run `./script/generate.ts` to regenerate the SDK and related files.
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # او github:anomalyco/opencode لاحدث
يتوفر OpenCode ايضا كتطبيق سطح مكتب. قم بالتنزيل مباشرة من [صفحة الاصدارات](https://github.com/anomalyco/opencode/releases) او من [opencode.ai/download](https://opencode.ai/download). يتوفر OpenCode ايضا كتطبيق سطح مكتب. قم بالتنزيل مباشرة من [صفحة الاصدارات](https://github.com/anomalyco/opencode/releases) او من [opencode.ai/download](https://opencode.ai/download).
| المنصة | التنزيل | | المنصة | التنزيل |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb` او `.rpm` او AppImage | | Linux | `.deb` او `.rpm` او AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev
OpenCode ডেস্কটপ অ্যাপ্লিকেশন হিসেবেও উপলব্ধ। সরাসরি [রিলিজ পেজ](https://github.com/anomalyco/opencode/releases) অথবা [opencode.ai/download](https://opencode.ai/download) থেকে ডাউনলোড করুন। OpenCode ডেস্কটপ অ্যাপ্লিকেশন হিসেবেও উপলব্ধ। সরাসরি [রিলিজ পেজ](https://github.com/anomalyco/opencode/releases) অথবা [opencode.ai/download](https://opencode.ai/download) থেকে ডাউনলোড করুন।
| প্ল্যাটফর্ম | ডাউনলোড | | প্ল্যাটফর্ম | ডাউনলোড |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, or `.AppImage` | | Linux | `.deb`, `.rpm`, or AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # ou github:anomalyco/opencode para a branch
O OpenCode também está disponível como aplicativo desktop. Baixe diretamente pela [página de releases](https://github.com/anomalyco/opencode/releases) ou em [opencode.ai/download](https://opencode.ai/download). O OpenCode também está disponível como aplicativo desktop. Baixe diretamente pela [página de releases](https://github.com/anomalyco/opencode/releases) ou em [opencode.ai/download](https://opencode.ai/download).
| Plataforma | Download | | Plataforma | Download |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm` ou AppImage | | Linux | `.deb`, `.rpm` ou AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # ili github:anomalyco/opencode za najnoviji
OpenCode je dostupan i kao desktop aplikacija. Preuzmi je direktno sa [stranice izdanja](https://github.com/anomalyco/opencode/releases) ili sa [opencode.ai/download](https://opencode.ai/download). OpenCode je dostupan i kao desktop aplikacija. Preuzmi je direktno sa [stranice izdanja](https://github.com/anomalyco/opencode/releases) ili sa [opencode.ai/download](https://opencode.ai/download).
| Platforma | Preuzimanje | | Platforma | Preuzimanje |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, ili AppImage | | Linux | `.deb`, `.rpm`, ili AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # eller github:anomalyco/opencode for nyeste
OpenCode findes også som desktop-app. Download direkte fra [releases-siden](https://github.com/anomalyco/opencode/releases) eller [opencode.ai/download](https://opencode.ai/download). OpenCode findes også som desktop-app. Download direkte fra [releases-siden](https://github.com/anomalyco/opencode/releases) eller [opencode.ai/download](https://opencode.ai/download).
| Platform | Download | | Platform | Download |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, eller AppImage | | Linux | `.deb`, `.rpm`, eller AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # oder github:anomalyco/opencode für den neu
OpenCode ist auch als Desktop-Anwendung verfügbar. Lade sie direkt von der [Releases-Seite](https://github.com/anomalyco/opencode/releases) oder [opencode.ai/download](https://opencode.ai/download) herunter. OpenCode ist auch als Desktop-Anwendung verfügbar. Lade sie direkt von der [Releases-Seite](https://github.com/anomalyco/opencode/releases) oder [opencode.ai/download](https://opencode.ai/download) herunter.
| Plattform | Download | | Plattform | Download |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm` oder AppImage | | Linux | `.deb`, `.rpm` oder AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # o github:anomalyco/opencode para la rama de
OpenCode también está disponible como aplicación de escritorio. Descárgala directamente desde la [página de releases](https://github.com/anomalyco/opencode/releases) o desde [opencode.ai/download](https://opencode.ai/download). OpenCode también está disponible como aplicación de escritorio. Descárgala directamente desde la [página de releases](https://github.com/anomalyco/opencode/releases) o desde [opencode.ai/download](https://opencode.ai/download).
| Plataforma | Descarga | | Plataforma | Descarga |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, o AppImage | | Linux | `.deb`, `.rpm`, o AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # ou github:anomalyco/opencode pour la branch
OpenCode est aussi disponible en application de bureau. Téléchargez-la directement depuis la [page des releases](https://github.com/anomalyco/opencode/releases) ou [opencode.ai/download](https://opencode.ai/download). OpenCode est aussi disponible en application de bureau. Téléchargez-la directement depuis la [page des releases](https://github.com/anomalyco/opencode/releases) ou [opencode.ai/download](https://opencode.ai/download).
| Plateforme | Téléchargement | | Plateforme | Téléchargement |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, ou AppImage | | Linux | `.deb`, `.rpm`, ou AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # ή github:anomalyco/opencode με βάση
Το OpenCode είναι επίσης διαθέσιμο ως εφαρμογή. Κατέβασε το απευθείας από τη [σελίδα εκδόσεων](https://github.com/anomalyco/opencode/releases) ή το [opencode.ai/download](https://opencode.ai/download). Το OpenCode είναι επίσης διαθέσιμο ως εφαρμογή. Κατέβασε το απευθείας από τη [σελίδα εκδόσεων](https://github.com/anomalyco/opencode/releases) ή το [opencode.ai/download](https://opencode.ai/download).
| Πλατφόρμα | Λήψη | | Πλατφόρμα | Λήψη |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, ή AppImage | | Linux | `.deb`, `.rpm`, ή AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # oppure github:anomalyco/opencode per lul
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). 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 | | Piattaforma | Download |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, oppure AppImage | | Linux | `.deb`, `.rpm`, oppure AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # または github:anomalyco/opencode で最
OpenCode はデスクトップアプリとしても利用できます。[releases page](https://github.com/anomalyco/opencode/releases) から直接ダウンロードするか、[opencode.ai/download](https://opencode.ai/download) を利用してください。 OpenCode はデスクトップアプリとしても利用できます。[releases page](https://github.com/anomalyco/opencode/releases) から直接ダウンロードするか、[opencode.ai/download](https://opencode.ai/download) を利用してください。
| プラットフォーム | ダウンロード | | プラットフォーム | ダウンロード |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb``.rpm`、または AppImage | | Linux | `.deb``.rpm`、または AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # 또는 github:anomalyco/opencode 로 최신
OpenCode 는 데스크톱 앱으로도 제공됩니다. [releases page](https://github.com/anomalyco/opencode/releases) 에서 직접 다운로드하거나 [opencode.ai/download](https://opencode.ai/download) 를 이용하세요. OpenCode 는 데스크톱 앱으로도 제공됩니다. [releases page](https://github.com/anomalyco/opencode/releases) 에서 직접 다운로드하거나 [opencode.ai/download](https://opencode.ai/download) 를 이용하세요.
| 플랫폼 | 다운로드 | | 플랫폼 | 다운로드 |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, 또는 AppImage | | Linux | `.deb`, `.rpm`, 또는 AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev
OpenCode is also available as a desktop application. Download directly from the [releases page](https://github.com/anomalyco/opencode/releases) or [opencode.ai/download](https://opencode.ai/download). OpenCode is also available as a desktop application. Download directly from the [releases page](https://github.com/anomalyco/opencode/releases) or [opencode.ai/download](https://opencode.ai/download).
| Platform | Download | | Platform | Download |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, or `.AppImage` | | Linux | `.deb`, `.rpm`, or AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # eller github:anomalyco/opencode for nyeste
OpenCode er også tilgjengelig som en desktop-app. Last ned direkte fra [releases-siden](https://github.com/anomalyco/opencode/releases) eller [opencode.ai/download](https://opencode.ai/download). OpenCode er også tilgjengelig som en desktop-app. Last ned direkte fra [releases-siden](https://github.com/anomalyco/opencode/releases) eller [opencode.ai/download](https://opencode.ai/download).
| Plattform | Nedlasting | | Plattform | Nedlasting |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm` eller AppImage | | Linux | `.deb`, `.rpm` eller AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # lub github:anomalyco/opencode dla najnowsze
OpenCode jest także dostępny jako aplikacja desktopowa. Pobierz ją bezpośrednio ze strony [releases](https://github.com/anomalyco/opencode/releases) lub z [opencode.ai/download](https://opencode.ai/download). OpenCode jest także dostępny jako aplikacja desktopowa. Pobierz ją bezpośrednio ze strony [releases](https://github.com/anomalyco/opencode/releases) lub z [opencode.ai/download](https://opencode.ai/download).
| Platforma | Pobieranie | | Platforma | Pobieranie |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm` lub AppImage | | Linux | `.deb`, `.rpm` lub AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # или github:anomalyco/opencode для с
OpenCode также доступен как десктопное приложение. Скачайте его со [страницы релизов](https://github.com/anomalyco/opencode/releases) или с [opencode.ai/download](https://opencode.ai/download). OpenCode также доступен как десктопное приложение. Скачайте его со [страницы релизов](https://github.com/anomalyco/opencode/releases) или с [opencode.ai/download](https://opencode.ai/download).
| Платформа | Загрузка | | Платформа | Загрузка |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm` или AppImage | | Linux | `.deb`, `.rpm` или AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # หรือ github:anomalyco/opencode ส
OpenCode มีให้ใช้งานเป็นแอปพลิเคชันเดสก์ท็อป ดาวน์โหลดโดยตรงจาก [หน้ารุ่น](https://github.com/anomalyco/opencode/releases) หรือ [opencode.ai/download](https://opencode.ai/download) OpenCode มีให้ใช้งานเป็นแอปพลิเคชันเดสก์ท็อป ดาวน์โหลดโดยตรงจาก [หน้ารุ่น](https://github.com/anomalyco/opencode/releases) หรือ [opencode.ai/download](https://opencode.ai/download)
| แพลตฟอร์ม | ดาวน์โหลด | | แพลตฟอร์ม | ดาวน์โหลด |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, หรือ AppImage | | Linux | `.deb`, `.rpm`, หรือ AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # veya en güncel geliştirme dalı için git
OpenCode ayrıca masaüstü uygulaması olarak da mevcuttur. Doğrudan [sürüm sayfasından](https://github.com/anomalyco/opencode/releases) veya [opencode.ai/download](https://opencode.ai/download) adresinden indirebilirsiniz. OpenCode ayrıca masaüstü uygulaması olarak da mevcuttur. Doğrudan [sürüm sayfasından](https://github.com/anomalyco/opencode/releases) veya [opencode.ai/download](https://opencode.ai/download) adresinden indirebilirsiniz.
| Platform | İndirme | | Platform | İndirme |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm` veya AppImage | | Linux | `.deb`, `.rpm` veya AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # або github:anomalyco/opencode для н
OpenCode також доступний як десктопний застосунок. Завантажуйте напряму зі [сторінки релізів](https://github.com/anomalyco/opencode/releases) або [opencode.ai/download](https://opencode.ai/download). OpenCode також доступний як десктопний застосунок. Завантажуйте напряму зі [сторінки релізів](https://github.com/anomalyco/opencode/releases) або [opencode.ai/download](https://opencode.ai/download).
| Платформа | Завантаження | | Платформа | Завантаження |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm` або AppImage | | Linux | `.deb`, `.rpm` або AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # hoặc github:anomalyco/opencode cho nhánh
OpenCode cũng có sẵn dưới dạng ứng dụng desktop. Tải trực tiếp từ [trang releases](https://github.com/anomalyco/opencode/releases) hoặc [opencode.ai/download](https://opencode.ai/download). OpenCode cũng có sẵn dưới dạng ứng dụng desktop. Tải trực tiếp từ [trang releases](https://github.com/anomalyco/opencode/releases) hoặc [opencode.ai/download](https://opencode.ai/download).
| Nền tảng | Tải xuống | | Nền tảng | Tải xuống |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, hoặc AppImage | | Linux | `.deb`, `.rpm`, hoặc AppImage |
```bash ```bash
# macOS (Homebrew) # macOS (Homebrew)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # 或用 github:anomalyco/opencode 获取最
OpenCode 也提供桌面版应用。可直接从 [发布页 (releases page)](https://github.com/anomalyco/opencode/releases) 或 [opencode.ai/download](https://opencode.ai/download) 下载。 OpenCode 也提供桌面版应用。可直接从 [发布页 (releases page)](https://github.com/anomalyco/opencode/releases) 或 [opencode.ai/download](https://opencode.ai/download) 下载。
| 平台 | 下载文件 | | 平台 | 下载文件 |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb``.rpm` 或 AppImage | | Linux | `.deb``.rpm` 或 AppImage |
```bash ```bash
# macOS (Homebrew Cask) # macOS (Homebrew Cask)
+6 -6
View File
@@ -68,12 +68,12 @@ nix run nixpkgs#opencode # 或使用 github:anomalyco/opencode 以取
OpenCode 也提供桌面版應用程式。您可以直接從 [發佈頁面 (releases page)](https://github.com/anomalyco/opencode/releases) 或 [opencode.ai/download](https://opencode.ai/download) 下載。 OpenCode 也提供桌面版應用程式。您可以直接從 [發佈頁面 (releases page)](https://github.com/anomalyco/opencode/releases) 或 [opencode.ai/download](https://opencode.ai/download) 下載。
| 平台 | 下載連結 | | 平台 | 下載連結 |
| --------------------- | ---------------------------------- | | --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | | macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` | | Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, 或 AppImage | | Linux | `.deb`, `.rpm`, 或 AppImage |
```bash ```bash
# macOS (Homebrew Cask) # macOS (Homebrew Cask)
+334 -148
View File
File diff suppressed because it is too large Load Diff
+1 -3
View File
@@ -1,8 +1,6 @@
[install] [install]
exact = true exact = true
# Only install newly resolved package versions published at least 3 days ago.
minimumReleaseAge = 259200
minimumReleaseAgeExcludes = ["@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-x64", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid"]
[test] [test]
root = "./do-not-run-tests-from-root" root = "./do-not-run-tests-from-root"
-1
View File
@@ -30,7 +30,6 @@ export const api = new sst.cloudflare.Worker("Api", {
transform: { transform: {
worker: (args) => { worker: (args) => {
args.logpush = true args.logpush = true
if ($app.stage === "vimtor") return
args.bindings = $resolve(args.bindings).apply((bindings) => [ args.bindings = $resolve(args.bindings).apply((bindings) => [
...bindings, ...bindings,
{ {
-15
View File
@@ -1,6 +1,5 @@
import { domain } from "./stage" import { domain } from "./stage"
import { EMAILOCTOPUS_API_KEY } from "./app" import { EMAILOCTOPUS_API_KEY } from "./app"
import { SECRET } from "./secret"
//////////////// ////////////////
// DATABASE // DATABASE
@@ -222,7 +221,6 @@ const AUTH_API_URL = new sst.Linkable("AUTH_API_URL", {
const STRIPE_WEBHOOK_SECRET = new sst.Linkable("STRIPE_WEBHOOK_SECRET", { const STRIPE_WEBHOOK_SECRET = new sst.Linkable("STRIPE_WEBHOOK_SECRET", {
properties: { value: stripeWebhook.secret }, properties: { value: stripeWebhook.secret },
}) })
const gatewayKv = new sst.cloudflare.Kv("GatewayKv") const gatewayKv = new sst.cloudflare.Kv("GatewayKv")
//////////////// ////////////////
@@ -232,7 +230,6 @@ const gatewayKv = new sst.cloudflare.Kv("GatewayKv")
const bucket = new sst.cloudflare.Bucket("ZenData") const bucket = new sst.cloudflare.Bucket("ZenData")
const bucketNew = new sst.cloudflare.Bucket("ZenDataNew") const bucketNew = new sst.cloudflare.Bucket("ZenDataNew")
const DISCORD_INCIDENT_WEBHOOK_URL = new sst.Secret("DISCORD_INCIDENT_WEBHOOK_URL")
const AWS_SES_ACCESS_KEY_ID = new sst.Secret("AWS_SES_ACCESS_KEY_ID") const AWS_SES_ACCESS_KEY_ID = new sst.Secret("AWS_SES_ACCESS_KEY_ID")
const AWS_SES_SECRET_ACCESS_KEY = new sst.Secret("AWS_SES_SECRET_ACCESS_KEY") const AWS_SES_SECRET_ACCESS_KEY = new sst.Secret("AWS_SES_SECRET_ACCESS_KEY")
@@ -254,8 +251,6 @@ new sst.cloudflare.x.SolidStart("Console", {
database, database,
AUTH_API_URL, AUTH_API_URL,
STRIPE_WEBHOOK_SECRET, STRIPE_WEBHOOK_SECRET,
DISCORD_INCIDENT_WEBHOOK_URL,
SECRET.HoneycombWebhookSecret,
STRIPE_SECRET_KEY, STRIPE_SECRET_KEY,
EMAILOCTOPUS_API_KEY, EMAILOCTOPUS_API_KEY,
AWS_SES_ACCESS_KEY_ID, AWS_SES_ACCESS_KEY_ID,
@@ -293,13 +288,3 @@ new sst.cloudflare.x.SolidStart("Console", {
}, },
}, },
}) })
////////////////
// HELPERS
////////////////
export const stat = new sst.cloudflare.Worker("Stat", {
handler: "packages/console/function/src/stat.ts",
link: [database],
url: true,
})
-266
View File
@@ -1,266 +0,0 @@
import { SECRET } from "./secret"
import { domain } from "./stage"
const description = "Managed by SST (Don't edit in Honeycomb UI)"
const webhookRecipient = new honeycomb.WebhookRecipient("DiscordAlerts", {
name: $app.stage === "production" ? "Discord Alerts" : `Discord Alerts (${$app.stage})`,
url: `https://${domain}/honeycomb/webhook`,
secret: SECRET.HoneycombWebhookSecret.result,
templates: [
{
type: "trigger",
body: `{
"url": {{ .Result.URL | quote }},
"type": {{ .Vars.type | quote }},
"name": {{ .Name | quote }},
"status": {{ .Alert.Status | quote }},
"isTest": {{ .Alert.IsTest }},
"groups": {{ .Result.GroupsTriggered | toJson }}
}`,
},
],
variables: [
{
name: "type",
},
],
})
// Honeycomb can keep stale query-local calculated fields when the name is unchanged,
// so tie the field name to the expression while avoiding deploy-to-deploy churn.
// https://github.com/honeycombio/terraform-provider-honeycombio/issues/852
const calculatedField = (field: { name: string; expression: string }) => ({
...field,
name: `${field.name}_${(
Array.from(field.expression).reduce((result, char) => Math.imul(31, result) + char.charCodeAt(0), 0) >>> 0
).toString(36)}`,
})
const modelHttpErrorsQuery = (product: "go" | "zen") => {
const filters = [
{ column: "model", op: "exists" },
{ column: "event_type", op: "=", value: "completions" },
{ column: "user_agent", op: "contains", value: "opencode" },
{ column: "isGoTier", op: "=", value: product === "go" ? "true" : "false" },
]
const failedHttpStatus = calculatedField({
name: "is_failed_http_status",
expression:
product === "go"
? `IF(AND(GTE($status, "400"), NOT(EQUALS($status, "401")), NOT(EQUALS($status, "429"))), 1, 0)`
: `IF(AND(EQUALS($status, "429"), $isFreeTier), 0, AND(GTE($status, "400"), NOT(EQUALS($status, "401"))), 1, 0)`,
})
return honeycomb.getQuerySpecificationOutput({
breakdowns: ["model"],
calculatedFields: [failedHttpStatus],
calculations: [
{ op: "COUNT", name: "TOTAL", filterCombination: "AND", filters },
{
op: "SUM",
name: "FAILED",
column: failedHttpStatus.name,
filterCombination: "AND",
filters,
},
],
formulas: [{ name: "ERROR", expression: "IF(GTE($TOTAL, 100), DIV($FAILED, $TOTAL), 0)" }],
timeRange: 900,
}).json
}
const providerHttpErrorsQuery = () => {
const filters = [
{ column: "provider", op: "exists" },
{ column: "user_agent", op: "contains", value: "opencode" },
]
const successHttpStatus = calculatedField({
name: "is_success_http_status",
expression: `IF(AND(GTE($status, "200"), LT($status, "400")), 1, 0)`,
})
const failedProviderHttpStatus = calculatedField({
name: "is_failed_provider_http_status",
expression: `IF(GT($llm.error.code, "400"), 1, 0)`,
})
return honeycomb.getQuerySpecificationOutput({
breakdowns: ["provider"],
calculatedFields: [successHttpStatus, failedProviderHttpStatus],
calculations: [
{
op: "SUM",
name: "SUCCESS",
column: successHttpStatus.name,
filterCombination: "AND",
filters: [...filters, { column: "event_type", op: "=", value: "completions" }],
},
{
op: "SUM",
name: "FAILED",
column: failedProviderHttpStatus.name,
filterCombination: "AND",
filters: [
...filters,
{ column: "event_type", op: "=", value: "llm.error" },
{ column: "llm.error.code", op: "!=", value: "404" },
],
},
],
formulas: [
{ name: "ERROR", expression: "IF(GTE(SUM($SUCCESS, $FAILED), 200), DIV($FAILED, SUM($SUCCESS, $FAILED)), 0)" },
],
timeRange: 900,
}).json
}
const modelLowTpsQuery = (product: "go" | "zen") => {
const filters = [
{ column: "model", op: "exists" },
{ column: "event_type", op: "=", value: "completions" },
{ column: "user_agent", op: "contains", value: "opencode" },
{ column: "isGoTier", op: "=", value: product === "go" ? "true" : "false" },
{ column: "status", op: ">=", value: "200" },
{ column: "status", op: "<", value: "400" },
{ column: "tps.output", op: "exists" },
]
return honeycomb.getQuerySpecificationOutput({
breakdowns: ["model"],
calculations: [
{ op: "COUNT", name: "TOTAL", filterCombination: "AND", filters },
{
op: "P50",
name: "TPS",
column: "tps.output",
filterCombination: "AND",
filters,
},
],
formulas: [{ name: "LOW_TPS", expression: "IF(GTE($TOTAL, 100), $TPS, 999)" }],
timeRange: 1800,
}).json
}
new honeycomb.Trigger("IncreasedModelHttpErrorsGo", {
name: "Increased Model HTTP Errors [Go]",
description,
queryJson: modelHttpErrorsQuery("go"),
alertType: "on_change",
frequency: 300,
thresholds: [{ op: ">=", value: 0.7, exceededLimit: 1 }],
recipients: [
{
id: webhookRecipient.id,
notificationDetails: [
{
variables: [{ name: "type", value: "model_http_errors" }],
},
],
},
],
})
new honeycomb.Trigger("IncreasedModelHttpErrorsZen", {
name: "Increased Model HTTP Errors [Zen]",
description,
queryJson: modelHttpErrorsQuery("zen"),
alertType: "on_change",
frequency: 300,
thresholds: [{ op: ">=", value: 0.7, exceededLimit: 1 }],
recipients: [
{
id: webhookRecipient.id,
notificationDetails: [
{
variables: [{ name: "type", value: "model_http_errors" }],
},
],
},
],
})
new honeycomb.Trigger("LowModelTpsGo", {
name: "Low Model TPS [Go]",
description,
queryJson: modelLowTpsQuery("go"),
alertType: "on_change",
frequency: 600,
thresholds: [{ op: "<=", value: 10, exceededLimit: 1 }],
recipients: [
{
id: webhookRecipient.id,
notificationDetails: [
{
variables: [{ name: "type", value: "model_low_tps" }],
},
],
},
],
})
new honeycomb.Trigger("LowModelTpsZen", {
name: "Low Model TPS [Zen]",
description,
queryJson: modelLowTpsQuery("zen"),
alertType: "on_change",
frequency: 600,
thresholds: [{ op: "<=", value: 10, exceededLimit: 1 }],
recipients: [
{
id: webhookRecipient.id,
notificationDetails: [
{
variables: [{ name: "type", value: "model_low_tps" }],
},
],
},
],
})
new honeycomb.Trigger("IncreasedProviderHttpErrors", {
name: "Increased Provider HTTP Errors",
description,
queryJson: providerHttpErrorsQuery(),
alertType: "on_change",
frequency: 300,
thresholds: [{ op: ">=", value: 0.7, exceededLimit: 1 }],
recipients: [
{
id: webhookRecipient.id,
notificationDetails: [
{
variables: [{ name: "type", value: "provider_http_errors" }],
},
],
},
],
})
new honeycomb.Trigger("IncreasedFreeTierRequests", {
name: "Increased Free Tier Requests",
description,
queryJson: honeycomb.getQuerySpecificationOutput({
calculations: [{ op: "COUNT" }],
filters: [
{ column: "event_type", op: "=", value: "completions" },
{ column: "user_agent", op: "contains", value: "opencode" },
{ column: "isFreeTier", op: "=", value: "true" },
],
timeRange: 3600,
}).json,
alertType: "on_change",
frequency: 900,
thresholds: [{ op: ">=", value: 50, exceededLimit: 1 }],
baselineDetails: [{ type: "percentage", offsetMinutes: 1440 }],
recipients: [
{
id: webhookRecipient.id,
notificationDetails: [
{
variables: [{ name: "type", value: "custom" }],
},
],
},
],
})
-7
View File
@@ -1,11 +1,4 @@
sst.Linkable.wrap(random.RandomPassword, (resource) => ({
properties: {
value: resource.result,
},
}))
export const SECRET = { export const SECRET = {
R2AccessKey: new sst.Secret("R2AccessKey", "unknown"), R2AccessKey: new sst.Secret("R2AccessKey", "unknown"),
R2SecretKey: new sst.Secret("R2SecretKey", "unknown"), R2SecretKey: new sst.Secret("R2SecretKey", "unknown"),
HoneycombWebhookSecret: new random.RandomPassword("HoneycombWebhookSecret", { length: 24 }),
} }
+4 -4
View File
@@ -1,8 +1,8 @@
{ {
"nodeModules": { "nodeModules": {
"x86_64-linux": "sha256-Hw7sVV9rTm6qBMtdwfLIV2QvxvLQY5qrywXzuyYbhcs=", "x86_64-linux": "sha256-9wTDLZsuGjkWyVOb6AG2VRYPiaSj/lnXwVkSwNeDcns=",
"aarch64-linux": "sha256-++oXnY7YqrYt0Qv7ZISmoHliARM9qEP8FacqLxGZH1c=", "aarch64-linux": "sha256-gmKlL2fQxY8bo+//8m9e1TNYJK3RXa4i8xsgtd046bc=",
"aarch64-darwin": "sha256-kZVa0R1YbuvtTzpETqK6ddj4ISje5jBFHBdlynkhW7Q=", "aarch64-darwin": "sha256-ENSJK+7rZi3m342mjtGg9N0P6zWEypXMpI7QdFMydbc=",
"x86_64-darwin": "sha256-94eagNDa8GGJxF8BsMX2BF5Pa+QTl48lXL1+6HgEn0I=" "x86_64-darwin": "sha256-gkxCxGh5dlwj03vZdz20pbiAwFEDpAlu/5iU8cwZOGI="
} }
} }
+7 -13
View File
@@ -7,13 +7,12 @@
"packageManager": "bun@1.3.13", "packageManager": "bun@1.3.13",
"scripts": { "scripts": {
"dev": "bun run --cwd packages/opencode --conditions=browser src/index.ts", "dev": "bun run --cwd packages/opencode --conditions=browser src/index.ts",
"dev:desktop": "bun --cwd packages/desktop dev", "dev:desktop": "bun --cwd packages/desktop-electron dev",
"dev:web": "bun --cwd packages/app dev", "dev:web": "bun --cwd packages/app dev",
"dev:console": "ulimit -n 10240 2>/dev/null; bun run --cwd packages/console/app dev", "dev:console": "ulimit -n 10240 2>/dev/null; bun run --cwd packages/console/app dev",
"dev:storybook": "bun --cwd packages/storybook storybook", "dev:storybook": "bun --cwd packages/storybook storybook",
"lint": "oxlint", "lint": "oxlint",
"typecheck": "bun turbo typecheck", "typecheck": "bun turbo typecheck",
"upgrade-opentui": "bun run script/upgrade-opentui.ts",
"postinstall": "bun run --cwd packages/opencode fix-node-pty", "postinstall": "bun run --cwd packages/opencode fix-node-pty",
"prepare": "husky", "prepare": "husky",
"random": "echo 'Random script'", "random": "echo 'Random script'",
@@ -28,20 +27,19 @@
"packages/slack" "packages/slack"
], ],
"catalog": { "catalog": {
"@effect/opentelemetry": "4.0.0-beta.65", "@effect/opentelemetry": "4.0.0-beta.57",
"@effect/platform-node": "4.0.0-beta.65", "@effect/platform-node": "4.0.0-beta.57",
"@npmcli/arborist": "9.4.0", "@npmcli/arborist": "9.4.0",
"@types/bun": "1.3.12", "@types/bun": "1.3.12",
"@types/cross-spawn": "6.0.6", "@types/cross-spawn": "6.0.6",
"@octokit/rest": "22.0.0", "@octokit/rest": "22.0.0",
"@hono/zod-validator": "0.4.2", "@hono/zod-validator": "0.4.2",
"@opentui/core": "0.2.10", "@opentui/core": "0.2.2",
"@opentui/keymap": "0.2.10", "@opentui/solid": "0.2.2",
"@opentui/solid": "0.2.10",
"ulid": "3.0.1", "ulid": "3.0.1",
"@kobalte/core": "0.13.11", "@kobalte/core": "0.13.11",
"@types/luxon": "3.7.1", "@types/luxon": "3.7.1",
"@types/node": "24.12.2", "@types/node": "22.13.9",
"@types/semver": "7.7.1", "@types/semver": "7.7.1",
"@tsconfig/node22": "22.0.2", "@tsconfig/node22": "22.0.2",
"@tsconfig/bun": "1.0.9", "@tsconfig/bun": "1.0.9",
@@ -55,7 +53,7 @@
"dompurify": "3.3.1", "dompurify": "3.3.1",
"drizzle-kit": "1.0.0-beta.19-d95b7a4", "drizzle-kit": "1.0.0-beta.19-d95b7a4",
"drizzle-orm": "1.0.0-beta.19-d95b7a4", "drizzle-orm": "1.0.0-beta.19-d95b7a4",
"effect": "4.0.0-beta.65", "effect": "4.0.0-beta.59",
"ai": "6.0.168", "ai": "6.0.168",
"cross-spawn": "7.0.6", "cross-spawn": "7.0.6",
"hono": "4.10.7", "hono": "4.10.7",
@@ -128,15 +126,11 @@
"electron" "electron"
], ],
"overrides": { "overrides": {
"@opentui/core": "catalog:",
"@opentui/keymap": "catalog:",
"@opentui/solid": "catalog:",
"@types/bun": "catalog:", "@types/bun": "catalog:",
"@types/node": "catalog:" "@types/node": "catalog:"
}, },
"patchedDependencies": { "patchedDependencies": {
"@npmcli/agent@4.0.0": "patches/@npmcli%2Fagent@4.0.0.patch", "@npmcli/agent@4.0.0": "patches/@npmcli%2Fagent@4.0.0.patch",
"@silvia-odwyer/photon-node@0.3.4": "patches/@silvia-odwyer%2Fphoton-node@0.3.4.patch",
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch", "@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch" "solid-js@1.9.10": "patches/solid-js@1.9.10.patch"
} }
+3 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@opencode-ai/app", "name": "@opencode-ai/app",
"version": "1.15.0", "version": "1.14.35",
"description": "", "description": "",
"type": "module", "type": "module",
"exports": { "exports": {
@@ -73,6 +73,7 @@
"solid-js": "catalog:", "solid-js": "catalog:",
"solid-list": "catalog:", "solid-list": "catalog:",
"tailwindcss": "catalog:", "tailwindcss": "catalog:",
"virtua": "catalog:" "virtua": "catalog:",
"zod": "catalog:"
} }
} }
@@ -107,8 +107,7 @@ function createCommandEntries(props: {
const allowed = createMemo(() => { const allowed = createMemo(() => {
if (props.filesOnly()) return [] if (props.filesOnly()) return []
return props.command.options.filter( return props.command.options.filter(
(option) => (option) => !option.disabled && !option.id.startsWith("suggested.") && option.id !== "file.open",
!option.disabled && !option.hidden && !option.id.startsWith("suggested.") && option.id !== "file.open",
) )
}) })
@@ -6,14 +6,12 @@ import { Dialog } from "@opencode-ai/ui/dialog"
import { List } from "@opencode-ai/ui/list" import { List } from "@opencode-ai/ui/list"
import { Switch } from "@opencode-ai/ui/switch" import { Switch } from "@opencode-ai/ui/switch"
import { useLanguage } from "@/context/language" import { useLanguage } from "@/context/language"
import { useQueryOptions } from "@/context/global-sync" import { loadMcpQuery } from "@/context/global-sync"
import { pathKey } from "@/utils/path-key"
const statusLabels = { const statusLabels = {
connected: "mcp.status.connected", connected: "mcp.status.connected",
failed: "mcp.status.failed", failed: "mcp.status.failed",
needs_auth: "mcp.status.needs_auth", needs_auth: "mcp.status.needs_auth",
needs_client_registration: "mcp.status.needs_client_registration",
disabled: "mcp.status.disabled", disabled: "mcp.status.disabled",
} as const } as const
@@ -22,7 +20,6 @@ export const DialogSelectMcp: Component = () => {
const sdk = useSDK() const sdk = useSDK()
const language = useLanguage() const language = useLanguage()
const queryClient = useQueryClient() const queryClient = useQueryClient()
const queryOptions = useQueryOptions()
const items = createMemo(() => const items = createMemo(() =>
Object.entries(sync.data.mcp ?? {}) Object.entries(sync.data.mcp ?? {})
@@ -32,18 +29,10 @@ export const DialogSelectMcp: Component = () => {
const toggle = useMutation(() => ({ const toggle = useMutation(() => ({
mutationFn: async (name: string) => { mutationFn: async (name: string) => {
const status = sync.data.mcp[name] if (sync.data.mcp[name]?.status === "connected") await sdk.client.mcp.disconnect({ name })
if (status?.status === "connected") { else await sdk.client.mcp.connect({ name })
await sdk.client.mcp.disconnect({ name })
return
}
if (status?.status === "needs_auth") {
await sdk.client.mcp.auth.authenticate({ name })
return
}
await sdk.client.mcp.connect({ name })
}, },
onSuccess: () => queryClient.refetchQueries(queryOptions.mcp(pathKey(sync.directory))), onSuccess: () => queryClient.refetchQueries({ queryKey: loadMcpQuery(sync.directory).queryKey }),
})) }))
const enabledCount = createMemo(() => items().filter((i) => i.status === "connected").length) const enabledCount = createMemo(() => items().filter((i) => i.status === "connected").length)
@@ -76,7 +65,7 @@ export const DialogSelectMcp: Component = () => {
} }
const error = () => { const error = () => {
const s = mcpStatus() const s = mcpStatus()
if (s?.status === "failed" || s?.status === "needs_client_registration") return s.error return s?.status === "failed" ? s.error : undefined
} }
const enabled = () => status() === "connected" const enabled = () => status() === "connected"
return ( return (
@@ -87,6 +76,9 @@ export const DialogSelectMcp: Component = () => {
<Show when={statusLabel()}> <Show when={statusLabel()}>
<span class="text-11-regular text-text-weaker">{statusLabel()}</span> <span class="text-11-regular text-text-weaker">{statusLabel()}</span>
</Show> </Show>
<Show when={toggle.isPending && toggle.variables === i.name}>
<span class="text-11-regular text-text-weak">{language.t("common.loading.ellipsis")}</span>
</Show>
</div> </div>
<Show when={error()}> <Show when={error()}>
<span class="text-11-regular text-text-weaker truncate">{error()}</span> <span class="text-11-regular text-text-weaker truncate">{error()}</span>
+9 -9
View File
@@ -55,8 +55,7 @@ import { PromptDragOverlay } from "./prompt-input/drag-overlay"
import { promptPlaceholder } from "./prompt-input/placeholder" import { promptPlaceholder } from "./prompt-input/placeholder"
import { ImagePreview } from "@opencode-ai/ui/image-preview" import { ImagePreview } from "@opencode-ai/ui/image-preview"
import { useQueries } from "@tanstack/solid-query" import { useQueries } from "@tanstack/solid-query"
import { useQueryOptions } from "@/context/global-sync" import { loadAgentsQuery, loadProvidersQuery } from "@/context/global-sync/bootstrap"
import { pathKey } from "@/utils/path-key"
interface PromptInputProps { interface PromptInputProps {
class?: string class?: string
@@ -103,7 +102,6 @@ const NON_EMPTY_TEXT = /[^\s\u200B]/
export const PromptInput: Component<PromptInputProps> = (props) => { export const PromptInput: Component<PromptInputProps> = (props) => {
const sdk = useSDK() const sdk = useSDK()
const queryOptions = useQueryOptions()
const sync = useSync() const sync = useSync()
const local = useLocal() const local = useLocal()
@@ -240,7 +238,13 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
return paths return paths
}) })
const info = createMemo(() => (params.id ? sync.session.get(params.id) : undefined)) const info = createMemo(() => (params.id ? sync.session.get(params.id) : undefined))
const working = createMemo(() => sync.data.session_working(params.id ?? "")) const status = createMemo(
() =>
sync.data.session_status[params.id ?? ""] ?? {
type: "idle",
},
)
const working = createMemo(() => status()?.type !== "idle")
const imageAttachments = createMemo(() => const imageAttachments = createMemo(() =>
prompt.current().filter((part): part is ImageAttachmentPart => part.type === "image"), prompt.current().filter((part): part is ImageAttachmentPart => part.type === "image"),
) )
@@ -1249,11 +1253,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
} }
const [agentsQuery, globalProvidersQuery, providersQuery] = useQueries(() => ({ const [agentsQuery, globalProvidersQuery, providersQuery] = useQueries(() => ({
queries: [ queries: [loadAgentsQuery(sdk.directory), loadProvidersQuery(null), loadProvidersQuery(sdk.directory)],
queryOptions.agents(pathKey(sdk.directory)),
queryOptions.providers(null),
queryOptions.providers(pathKey(sdk.directory)),
],
})) }))
const agentsLoading = () => agentsQuery.isLoading const agentsLoading = () => agentsQuery.isLoading
@@ -123,13 +123,11 @@ function listFor(command: CommandContext, map: KeybindMap, palette: string) {
for (const opt of command.catalog) { for (const opt of command.catalog) {
if (opt.id.startsWith("suggested.")) continue if (opt.id.startsWith("suggested.")) continue
if (opt.hidden) continue
out.set(opt.id, { title: opt.title, group: groupFor(opt.id) }) out.set(opt.id, { title: opt.title, group: groupFor(opt.id) })
} }
for (const opt of command.options) { for (const opt of command.options) {
if (opt.id.startsWith("suggested.")) continue if (opt.id.startsWith("suggested.")) continue
if (opt.hidden) continue
out.set(opt.id, { title: opt.title, group: groupFor(opt.id) }) out.set(opt.id, { title: opt.title, group: groupFor(opt.id) })
} }
@@ -15,8 +15,7 @@ import { useSDK } from "@/context/sdk"
import { normalizeServerUrl, ServerConnection, useServer } from "@/context/server" import { normalizeServerUrl, ServerConnection, useServer } from "@/context/server"
import { useSync } from "@/context/sync" import { useSync } from "@/context/sync"
import { useCheckServerHealth, type ServerHealth } from "@/utils/server-health" import { useCheckServerHealth, type ServerHealth } from "@/utils/server-health"
import { useQueryOptions } from "@/context/global-sync" import { loadMcpQuery } from "@/context/global-sync"
import { pathKey } from "@/utils/path-key"
const pollMs = 10_000 const pollMs = 10_000
@@ -140,22 +139,13 @@ const useMcpToggleMutation = () => {
const sdk = useSDK() const sdk = useSDK()
const language = useLanguage() const language = useLanguage()
const queryClient = useQueryClient() const queryClient = useQueryClient()
const queryOptions = useQueryOptions()
return useMutation(() => ({ return useMutation(() => ({
mutationFn: async (name: string) => { mutationFn: async (name: string) => {
const status = sync.data.mcp[name] const status = sync.data.mcp[name]
if (status?.status === "connected") { await (status?.status === "connected" ? sdk.client.mcp.disconnect({ name }) : sdk.client.mcp.connect({ name }))
await sdk.client.mcp.disconnect({ name })
return
}
if (status?.status === "needs_auth") {
await sdk.client.mcp.auth.authenticate({ name })
return
}
await sdk.client.mcp.connect({ name })
}, },
onSuccess: () => queryClient.refetchQueries(queryOptions.mcp(pathKey(sync.directory))), onSuccess: () => queryClient.refetchQueries({ queryKey: loadMcpQuery(sync.directory).queryKey }),
onError: (err) => { onError: (err) => {
showToast({ showToast({
variant: "error", variant: "error",
@@ -324,7 +314,7 @@ export function StatusPopoverBody(props: { shown: Accessor<boolean> }) {
return ( return (
<button <button
type="button" type="button"
class="flex items-center gap-2 w-full min-h-8 pl-3 pr-2 py-1 rounded-md hover:bg-surface-raised-base-hover transition-colors text-left" 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={() => { onClick={() => {
if (toggleMcp.isPending) return if (toggleMcp.isPending) return
toggleMcp.mutate(name) toggleMcp.mutate(name)
@@ -341,16 +331,7 @@ export function StatusPopoverBody(props: { shown: Accessor<boolean> }) {
status() === "needs_auth" || status() === "needs_client_registration", status() === "needs_auth" || status() === "needs_client_registration",
}} }}
/> />
<span class="flex flex-col min-w-0 flex-1"> <span class="text-14-regular text-text-base truncate flex-1">{name}</span>
<span class="flex items-center gap-2 min-w-0">
<span class="text-14-regular text-text-base truncate">{name}</span>
</span>
<Show when={status() === "needs_auth"}>
<span class="text-11-regular text-text-weaker truncate">
{language.t("mcp.auth.clickToAuthenticate")}
</span>
</Show>
</span>
<div onClick={(event) => event.stopPropagation()}> <div onClick={(event) => event.stopPropagation()}>
<Switch <Switch
checked={enabled()} checked={enabled()}
@@ -14,14 +14,12 @@ export function StatusPopover() {
const sync = useSync() const sync = useSync()
const [shown, setShown] = createSignal(false) const [shown, setShown] = createSignal(false)
const ready = createMemo(() => server.healthy() === false || sync.data.mcp_ready) const ready = createMemo(() => server.healthy() === false || sync.data.mcp_ready)
const mcpIssue = createMemo(() => { const healthy = createMemo(() => {
const serverHealthy = server.healthy() === true
const mcp = Object.values(sync.data.mcp ?? {}) const mcp = Object.values(sync.data.mcp ?? {})
const failed = mcp.some((item) => item.status === "failed" || item.status === "needs_client_registration") const issue = mcp.some((item) => item.status !== "connected" && item.status !== "disabled")
const warn = mcp.some((item) => item.status === "needs_auth") return serverHealthy && !issue
if (failed) return "critical" as const
if (warn) return "warning" as const
}) })
const healthy = createMemo(() => server.healthy() === true && !mcpIssue())
return ( return (
<Popover <Popover
@@ -43,9 +41,7 @@ export function StatusPopover() {
classList={{ classList={{
"absolute -top-px -right-px size-1.5 rounded-full": true, "absolute -top-px -right-px size-1.5 rounded-full": true,
"bg-icon-success-base": ready() && healthy(), "bg-icon-success-base": ready() && healthy(),
"bg-icon-warning-base": ready() && server.healthy() === true && mcpIssue() === "warning", "bg-icon-critical-base": server.healthy() === false || (ready() && !healthy()),
"bg-icon-critical-base":
server.healthy() === false || (ready() && server.healthy() === true && mcpIssue() === "critical"),
"bg-border-weak-base": server.healthy() === undefined || !ready(), "bg-border-weak-base": server.healthy() === undefined || !ready(),
}} }}
/> />
+132 -147
View File
@@ -35,9 +35,6 @@ type TauriApi = {
const tauriApi = () => (window as unknown as { __TAURI__?: TauriApi }).__TAURI__ const tauriApi = () => (window as unknown as { __TAURI__?: TauriApi }).__TAURI__
const currentDesktopWindow = () => tauriApi()?.window?.getCurrentWindow?.() const currentDesktopWindow = () => tauriApi()?.window?.getCurrentWindow?.()
const currentThemeWindow = () => tauriApi()?.webviewWindow?.getCurrentWebviewWindow?.() const currentThemeWindow = () => tauriApi()?.webviewWindow?.getCurrentWebviewWindow?.()
const titlebarHeight = 40
const minTitlebarZoom = 0.25
const windowsControlsBaseWidth = 138 // 3 native Windows caption buttons at 46px each.
export function Titlebar() { export function Titlebar() {
const layout = useLayout() const layout = useLayout()
@@ -54,14 +51,7 @@ export function Titlebar() {
const windows = createMemo(() => platform.platform === "desktop" && platform.os === "windows") const windows = createMemo(() => platform.platform === "desktop" && platform.os === "windows")
const web = createMemo(() => platform.platform === "web") const web = createMemo(() => platform.platform === "web")
const zoom = () => platform.webviewZoom?.() ?? 1 const zoom = () => platform.webviewZoom?.() ?? 1
const titlebarZoom = () => (windows() ? Math.max(zoom(), minTitlebarZoom) : zoom()) const minHeight = () => (mac() ? `${40 / zoom()}px` : undefined)
const counterZoom = () => (windows() && titlebarZoom() < 1 ? 1 / titlebarZoom() : 1)
const minHeight = () => {
if (mac()) return `${titlebarHeight / zoom()}px`
if (windows()) return `${titlebarHeight / Math.min(titlebarZoom(), 1)}px`
return undefined
}
const windowsControlsWidth = () => `${windowsControlsBaseWidth / Math.max(titlebarZoom(), 1)}px`
const [history, setHistory] = createStore({ const [history, setHistory] = createStore({
stack: [] as string[], stack: [] as string[],
@@ -175,161 +165,156 @@ export function Titlebar() {
return ( return (
<header <header
class="h-10 shrink-0 bg-background-base relative overflow-hidden" class="h-10 shrink-0 bg-background-base relative grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center"
style={{ "min-height": minHeight() }} style={{ "min-height": minHeight() }}
data-tauri-drag-region data-tauri-drag-region
onMouseDown={drag} onMouseDown={drag}
onDblClick={maximize} onDblClick={maximize}
> >
<div <div
class="grid h-full min-h-full w-full grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center" classList={{
style={{ zoom: counterZoom() }} "flex items-center min-w-0": true,
"pl-2": !mac(),
}}
> >
<div <Show when={mac()}>
classList={{ <div class="h-full shrink-0" style={{ width: `${72 / zoom()}px` }} />
"flex items-center min-w-0": true, <div class="xl:hidden w-10 shrink-0 flex items-center justify-center">
"pl-2": !mac(), <IconButton
}} icon="menu"
> variant="ghost"
<Show when={mac()}> class="titlebar-icon rounded-md"
<div class="h-full shrink-0" style={{ width: `${72 / zoom()}px` }} /> onClick={layout.mobileSidebar.toggle}
<div class="xl:hidden w-10 shrink-0 flex items-center justify-center"> aria-label={language.t("sidebar.menu.toggle")}
<IconButton aria-expanded={layout.mobileSidebar.opened()}
icon="menu" />
variant="ghost" </div>
class="titlebar-icon rounded-md" </Show>
onClick={layout.mobileSidebar.toggle} <Show when={!mac()}>
aria-label={language.t("sidebar.menu.toggle")} <div class="xl:hidden w-[48px] shrink-0 flex items-center justify-center">
aria-expanded={layout.mobileSidebar.opened()} <IconButton
/> icon="menu"
</div> variant="ghost"
</Show> class="titlebar-icon rounded-md"
<Show when={!mac()}> onClick={layout.mobileSidebar.toggle}
<div class="xl:hidden w-[48px] shrink-0 flex items-center justify-center"> aria-label={language.t("sidebar.menu.toggle")}
<IconButton aria-expanded={layout.mobileSidebar.opened()}
icon="menu" />
variant="ghost" </div>
class="titlebar-icon rounded-md" </Show>
onClick={layout.mobileSidebar.toggle} <div class="flex items-center gap-1 shrink-0">
aria-label={language.t("sidebar.menu.toggle")} <TooltipKeybind
aria-expanded={layout.mobileSidebar.opened()} class={web() ? "hidden xl:flex shrink-0 ml-14" : "hidden xl:flex shrink-0 ml-2"}
/> placement="bottom"
</div> title={language.t("command.sidebar.toggle")}
</Show> keybind={command.keybind("sidebar.toggle")}
<div class="flex items-center gap-1 shrink-0"> >
<TooltipKeybind <Button
class={web() ? "hidden xl:flex shrink-0 ml-14" : "hidden xl:flex shrink-0 ml-2"} variant="ghost"
placement="bottom" class="group/sidebar-toggle titlebar-icon w-8 h-6 p-0 box-border"
title={language.t("command.sidebar.toggle")} onClick={layout.sidebar.toggle}
keybind={command.keybind("sidebar.toggle")} aria-label={language.t("command.sidebar.toggle")}
aria-expanded={layout.sidebar.opened()}
> >
<Button <Icon size="small" name={layout.sidebar.opened() ? "sidebar-active" : "sidebar"} />
variant="ghost" </Button>
class="group/sidebar-toggle titlebar-icon w-8 h-6 p-0 box-border" </TooltipKeybind>
onClick={layout.sidebar.toggle} <div class="hidden xl:flex items-center shrink-0">
aria-label={language.t("command.sidebar.toggle")} <Show when={params.dir}>
aria-expanded={layout.sidebar.opened()} <div
class="flex items-center shrink-0 w-8 mr-1"
aria-hidden={layout.sidebar.opened() ? "true" : undefined}
> >
<Icon size="small" name={layout.sidebar.opened() ? "sidebar-active" : "sidebar"} />
</Button>
</TooltipKeybind>
<div class="hidden xl:flex items-center shrink-0">
<Show when={params.dir}>
<div <div
class="flex items-center shrink-0 w-8 mr-1" class="transition-opacity"
aria-hidden={layout.sidebar.opened() ? "true" : undefined} classList={{
"opacity-100 duration-120 ease-out": !layout.sidebar.opened(),
"opacity-0 duration-120 ease-in delay-0 pointer-events-none": layout.sidebar.opened(),
}}
> >
<div <TooltipKeybind
class="transition-opacity" placement="bottom"
classList={{ title={language.t("command.session.new")}
"opacity-100 duration-120 ease-out": !layout.sidebar.opened(), keybind={command.keybind("session.new")}
"opacity-0 duration-120 ease-in delay-0 pointer-events-none": layout.sidebar.opened(), openDelay={2000}
}}
> >
<TooltipKeybind <Button
placement="bottom" variant="ghost"
title={language.t("command.session.new")} icon={creating() ? "new-session-active" : "new-session"}
keybind={command.keybind("session.new")} class="titlebar-icon w-8 h-6 p-0 box-border"
openDelay={2000} disabled={layout.sidebar.opened()}
> tabIndex={layout.sidebar.opened() ? -1 : undefined}
<Button onClick={() => {
variant="ghost" if (!params.dir) return
icon={creating() ? "new-session-active" : "new-session"} navigate(`/${params.dir}/session`)
class="titlebar-icon w-8 h-6 p-0 box-border" }}
disabled={layout.sidebar.opened()} aria-label={language.t("command.session.new")}
tabIndex={layout.sidebar.opened() ? -1 : undefined} aria-current={creating() ? "page" : undefined}
onClick={() => { />
if (!params.dir) return </TooltipKeybind>
navigate(`/${params.dir}/session`) </div>
}} </div>
aria-label={language.t("command.session.new")} </Show>
aria-current={creating() ? "page" : undefined} <div
/> class="flex items-center shrink-0"
</TooltipKeybind> classList={{
</div> "-translate-x-[36px]": layout.sidebar.opened() && !!params.dir,
"duration-180 ease-out": !layout.sidebar.opened(),
"duration-180 ease-in": layout.sidebar.opened(),
}}
>
<Show when={hasProjects() && nav()}>
<div class="flex items-center gap-0 transition-transform">
<Tooltip placement="bottom" value={language.t("common.goBack")} openDelay={2000}>
<Button
variant="ghost"
icon="chevron-left"
class="titlebar-icon w-6 h-6 p-0 box-border"
disabled={!canBack()}
onClick={back}
aria-label={language.t("common.goBack")}
/>
</Tooltip>
<Tooltip placement="bottom" value={language.t("common.goForward")} openDelay={2000}>
<Button
variant="ghost"
icon="chevron-right"
class="titlebar-icon w-6 h-6 p-0 box-border"
disabled={!canForward()}
onClick={forward}
aria-label={language.t("common.goForward")}
/>
</Tooltip>
</div> </div>
</Show> </Show>
<div <div id="opencode-titlebar-left" class="flex items-center gap-3 min-w-0 px-2" />
class="flex items-center shrink-0" {["beta", "dev"].includes(import.meta.env.VITE_OPENCODE_CHANNEL) && (
classList={{ <div class="bg-icon-interactive-base text-[#FFF] font-medium px-2 rounded-sm uppercase font-mono">
"-translate-x-[36px]": layout.sidebar.opened() && !!params.dir, {import.meta.env.VITE_OPENCODE_CHANNEL.toUpperCase()}
"duration-180 ease-out": !layout.sidebar.opened(), </div>
"duration-180 ease-in": layout.sidebar.opened(), )}
}}
>
<Show when={hasProjects() && nav()}>
<div class="flex items-center gap-0 transition-transform">
<Tooltip placement="bottom" value={language.t("common.goBack")} openDelay={2000}>
<Button
variant="ghost"
icon="chevron-left"
class="titlebar-icon w-6 h-6 p-0 box-border"
disabled={!canBack()}
onClick={back}
aria-label={language.t("common.goBack")}
/>
</Tooltip>
<Tooltip placement="bottom" value={language.t("common.goForward")} openDelay={2000}>
<Button
variant="ghost"
icon="chevron-right"
class="titlebar-icon w-6 h-6 p-0 box-border"
disabled={!canForward()}
onClick={forward}
aria-label={language.t("common.goForward")}
/>
</Tooltip>
</div>
</Show>
<div id="opencode-titlebar-left" class="flex items-center gap-3 min-w-0 px-2" />
{["beta", "dev"].includes(import.meta.env.VITE_OPENCODE_CHANNEL) && (
<div class="bg-icon-interactive-base text-[#FFF] font-medium px-2 rounded-sm uppercase font-mono">
{import.meta.env.VITE_OPENCODE_CHANNEL.toUpperCase()}
</div>
)}
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="min-w-0 flex items-center justify-center pointer-events-none"> <div class="min-w-0 flex items-center justify-center pointer-events-none">
<div id="opencode-titlebar-center" class="pointer-events-auto min-w-0 flex justify-center w-fit max-w-full" /> <div id="opencode-titlebar-center" class="pointer-events-auto min-w-0 flex justify-center w-fit max-w-full" />
</div> </div>
<div <div
classList={{ classList={{
"flex items-center min-w-0 justify-end": true, "flex items-center min-w-0 justify-end": true,
"pr-2": !windows(), "pr-2": !windows(),
}} }}
data-tauri-drag-region data-tauri-drag-region
onMouseDown={drag} onMouseDown={drag}
> >
<div id="opencode-titlebar-right" class="flex items-center gap-1 shrink-0 justify-end" /> <div id="opencode-titlebar-right" class="flex items-center gap-1 shrink-0 justify-end" />
<Show when={windows()}> <Show when={windows()}>
{!tauriApi() && <div class="shrink-0" style={{ width: windowsControlsWidth() }} />} {!tauriApi() && <div class="w-36 shrink-0" />}
<div data-tauri-decorum-tb class="flex flex-row" /> <div data-tauri-decorum-tb class="flex flex-row" />
</Show> </Show>
</div>
</div> </div>
</header> </header>
) )
+7 -10
View File
@@ -81,7 +81,6 @@ export interface CommandOption {
slash?: string slash?: string
suggested?: boolean suggested?: boolean
disabled?: boolean disabled?: boolean
hidden?: boolean
onSelect?: (source?: "palette" | "keybind" | "slash") => void onSelect?: (source?: "palette" | "keybind" | "slash") => void
onHighlight?: () => (() => void) | void onHighlight?: () => (() => void) | void
} }
@@ -94,7 +93,6 @@ export type CommandCatalogItem = {
category?: string category?: string
keybind?: KeybindConfig keybind?: KeybindConfig
slash?: string slash?: string
hidden?: boolean
} }
export type CommandRegistration = { export type CommandRegistration = {
@@ -281,14 +279,13 @@ export const { use: useCommand, provider: CommandProvider } = createSimpleContex
setCatalog( setCatalog(
registered().reduce((acc, opt) => { registered().reduce((acc, opt) => {
const id = actionId(opt.id) const id = actionId(opt.id)
if (opt.title) acc[id] = {
acc[id] = { title: opt.title,
title: opt.title, description: opt.description,
description: opt.description, category: opt.category,
category: opt.category, keybind: opt.keybind,
keybind: opt.keybind, slash: opt.slash,
slash: opt.slash, }
}
return acc return acc
}, {} as CommandCatalog), }, {} as CommandCatalog),
) )
+5 -3
View File
@@ -3,13 +3,15 @@ import { createSimpleContext } from "@opencode-ai/ui/context"
import { createGlobalEmitter } from "@solid-primitives/event-bus" import { createGlobalEmitter } from "@solid-primitives/event-bus"
import { makeEventListener } from "@solid-primitives/event-listener" import { makeEventListener } from "@solid-primitives/event-listener"
import { batch, onCleanup, onMount } from "solid-js" import { batch, onCleanup, onMount } from "solid-js"
import z from "zod"
import { createSdkForServer } from "@/utils/server" import { createSdkForServer } from "@/utils/server"
import { useLanguage } from "./language" import { useLanguage } from "./language"
import { usePlatform } from "./platform" import { usePlatform } from "./platform"
import { useServer } from "./server" import { useServer } from "./server"
const isAbortError = (error: unknown) => const abortError = z.object({
error !== null && typeof error === "object" && "name" in error && error.name === "AbortError" name: z.literal("AbortError"),
})
export const { use: useGlobalSDK, provider: GlobalSDKProvider } = createSimpleContext({ export const { use: useGlobalSDK, provider: GlobalSDKProvider } = createSimpleContext({
name: "GlobalSDK", name: "GlobalSDK",
@@ -101,7 +103,7 @@ export const { use: useGlobalSDK, provider: GlobalSDKProvider } = createSimpleCo
let streamErrorLogged = false let streamErrorLogged = false
const wait = (ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms)) const wait = (ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms))
const aborted = isAbortError const aborted = (error: unknown) => abortError.safeParse(error).success
let attempt: AbortController | undefined let attempt: AbortController | undefined
let run: Promise<void> | undefined let run: Promise<void> | undefined
+26 -47
View File
@@ -18,7 +18,6 @@ import {
bootstrapDirectory, bootstrapDirectory,
bootstrapGlobal, bootstrapGlobal,
clearProviderRev, clearProviderRev,
loadAgentsQuery,
loadGlobalConfigQuery, loadGlobalConfigQuery,
loadPathQuery, loadPathQuery,
loadProjectsQuery, loadProjectsQuery,
@@ -32,10 +31,9 @@ import { trimSessions } from "./global-sync/session-trim"
import type { ProjectMeta } from "./global-sync/types" import type { ProjectMeta } from "./global-sync/types"
import { SESSION_RECENT_LIMIT } from "./global-sync/types" import { SESSION_RECENT_LIMIT } from "./global-sync/types"
import { formatServerError } from "@/utils/server-errors" import { formatServerError } from "@/utils/server-errors"
import { queryOptions, useMutation, useQueries, useQuery, useQueryClient } from "@tanstack/solid-query" import { queryOptions, skipToken, useMutation, useQueries, useQuery, useQueryClient } from "@tanstack/solid-query"
import { createRefreshQueue } from "./global-sync/queue" import { createRefreshQueue } from "./global-sync/queue"
import { directoryKey } from "./global-sync/utils" import { directoryKey } from "./global-sync/utils"
import { PathKey } from "@/utils/path-key"
type GlobalStore = { type GlobalStore = {
ready: boolean ready: boolean
@@ -51,33 +49,21 @@ type GlobalStore = {
reload: undefined | "pending" | "complete" reload: undefined | "pending" | "complete"
} }
export const loadMcpQuery = (directory: string, sdk: OpencodeClient) => export const loadSessionsQuery = (directory: string) =>
queryOptions<null>({ queryKey: [directory, "loadSessions"], queryFn: skipToken })
export const loadMcpQuery = (directory: string, sdk?: OpencodeClient) =>
queryOptions({ queryOptions({
queryKey: [directory, "mcp"] as const, queryKey: [directory, "mcp"],
queryFn: () => sdk.mcp.status().then((r) => r.data ?? {}), queryFn: sdk ? () => sdk.mcp.status().then((r) => r.data ?? {}) : skipToken,
}) })
export const loadLspQuery = (directory: string, sdk: OpencodeClient) => export const loadLspQuery = (directory: string, sdk?: OpencodeClient) =>
queryOptions({ queryOptions({
queryKey: [directory, "lsp"] as const, queryKey: [directory, "lsp"],
queryFn: () => sdk.lsp.status().then((r) => r.data ?? []), queryFn: sdk ? () => sdk.lsp.status().then((r) => r.data ?? []) : skipToken,
}) })
function makeQueryOptionsApi(globalSDK: () => OpencodeClient, sdkFor: (dir: PathKey) => OpencodeClient) {
return {
globalConfig: () => loadGlobalConfigQuery(globalSDK()),
projects: () => loadProjectsQuery(globalSDK()),
providers: (directory: PathKey | null) =>
loadProvidersQuery(directory, directory === null ? globalSDK() : sdkFor(directory)),
path: (directory: PathKey | null) => loadPathQuery(directory, directory === null ? globalSDK() : sdkFor(directory)),
agents: (directory: PathKey) => loadAgentsQuery(directory, sdkFor(directory)),
mcp: (directory: PathKey) => loadMcpQuery(directory, sdkFor(directory)),
lsp: (directory: PathKey) => loadLspQuery(directory, sdkFor(directory)),
sessions: (directory: PathKey) => ({ queryKey: [directory, "loadSessions"] as const }),
}
}
export type QueryOptionsApi = ReturnType<typeof makeQueryOptionsApi>
function createGlobalSync() { function createGlobalSync() {
const globalSDK = useGlobalSDK() const globalSDK = useGlobalSDK()
const language = useLanguage() const language = useLanguage()
@@ -89,22 +75,8 @@ function createGlobalSync() {
const sessionLoads = new Map<string, Promise<void>>() const sessionLoads = new Map<string, Promise<void>>()
const sessionMeta = new Map<string, { limit: number }>() const sessionMeta = new Map<string, { limit: number }>()
const sdkFor = (directory: string) => {
const key = directoryKey(directory)
const cached = sdkCache.get(key)
if (cached) return cached
const sdk = globalSDK.createClient({
directory,
throwOnError: true,
})
sdkCache.set(key, sdk)
return sdk
}
const queryOptionsApi = makeQueryOptionsApi(() => globalSDK.client, sdkFor)
const [configQuery, providerQuery, pathQuery] = useQueries(() => ({ const [configQuery, providerQuery, pathQuery] = useQueries(() => ({
queries: [queryOptionsApi.globalConfig(), queryOptionsApi.providers(null), queryOptionsApi.path(null)], queries: [loadGlobalConfigQuery(), loadProvidersQuery(null), loadPathQuery(null), loadProjectsQuery()],
})) }))
const [globalStore, setGlobalStore] = createStore<GlobalStore>({ const [globalStore, setGlobalStore] = createStore<GlobalStore>({
@@ -203,6 +175,18 @@ function createGlobalSync() {
bootstrapInstance, bootstrapInstance,
}) })
const sdkFor = (directory: string) => {
const key = directoryKey(directory)
const cached = sdkCache.get(key)
if (cached) return cached
const sdk = globalSDK.createClient({
directory,
throwOnError: true,
})
sdkCache.set(key, sdk)
return sdk
}
const children = createChildStoreManager({ const children = createChildStoreManager({
owner, owner,
isBooting: (directory) => booting.has(directory), isBooting: (directory) => booting.has(directory),
@@ -219,7 +203,7 @@ function createGlobalSync() {
clearSessionPrefetchDirectory(key) clearSessionPrefetchDirectory(key)
}, },
translate: language.t, translate: language.t,
queryOptions: queryOptionsApi, getSdk: sdkFor,
global: { global: {
provider: globalStore.provider, provider: globalStore.provider,
}, },
@@ -249,7 +233,7 @@ function createGlobalSync() {
const limit = Math.max(store.limit + SESSION_RECENT_LIMIT, SESSION_RECENT_LIMIT) const limit = Math.max(store.limit + SESSION_RECENT_LIMIT, SESSION_RECENT_LIMIT)
const promise = queryClient const promise = queryClient
.fetchQuery({ .fetchQuery({
...queryOptionsApi.sessions(key), ...loadSessionsQuery(key),
queryFn: () => queryFn: () =>
loadRootSessionsWithFallback({ loadRootSessionsWithFallback({
directory, directory,
@@ -378,7 +362,7 @@ function createGlobalSync() {
setSessionTodo, setSessionTodo,
vcsCache: children.vcsCache.get(key), vcsCache: children.vcsCache.get(key),
loadLsp: () => { loadLsp: () => {
void queryClient.fetchQuery(queryOptionsApi.lsp(key)) void queryClient.fetchQuery(loadLspQuery(key, sdkFor(directory)))
}, },
}) })
}) })
@@ -436,7 +420,6 @@ function createGlobalSync() {
}, },
child: children.child, child: children.child,
peek: children.peek, peek: children.peek,
queryOptions: queryOptionsApi,
// bootstrap, // bootstrap,
updateConfig: updateConfigMutation.mutateAsync, updateConfig: updateConfigMutation.mutateAsync,
project: projectApi, project: projectApi,
@@ -458,7 +441,3 @@ export function useGlobalSync() {
if (!context) throw new Error("useGlobalSync must be used within GlobalSyncProvider") if (!context) throw new Error("useGlobalSync must be used within GlobalSyncProvider")
return context return context
} }
export function useQueryOptions() {
return useGlobalSync().queryOptions
}
@@ -18,7 +18,7 @@ import { reconcile, type SetStoreFunction, type Store } from "solid-js/store"
import type { State, VcsCache } from "./types" import type { State, VcsCache } from "./types"
import { cmp, normalizeAgentList, normalizeProviderList } from "./utils" import { cmp, normalizeAgentList, normalizeProviderList } from "./utils"
import { formatServerError } from "@/utils/server-errors" import { formatServerError } from "@/utils/server-errors"
import { QueryClient, queryOptions } from "@tanstack/solid-query" import { QueryClient, queryOptions, skipToken } from "@tanstack/solid-query"
import { loadMcpQuery } from "../global-sync" import { loadMcpQuery } from "../global-sync"
type GlobalStore = { type GlobalStore = {
@@ -83,25 +83,44 @@ function showErrors(input: {
}) })
} }
export const loadGlobalConfigQuery = (sdk: OpencodeClient) => export const loadGlobalConfigQuery = (
sdk?: OpencodeClient,
transform?: (x: Awaited<ReturnType<OpencodeClient["global"]["config"]["get"]>>) => void,
) =>
queryOptions({ queryOptions({
queryKey: ["config"], queryKey: ["config"],
queryFn: () => retry(() => sdk.global.config.get().then((x) => x.data!)), queryFn: sdk
? () =>
retry(() =>
sdk.global.config.get().then((x) => {
transform?.(x)
return x.data!
}),
)
: skipToken,
}) })
export const loadProjectsQuery = (sdk: OpencodeClient) => export const loadProjectsQuery = (
sdk?: OpencodeClient,
transform?: (x: Awaited<ReturnType<OpencodeClient["project"]["list"]>>["data"]) => void,
) =>
queryOptions({ queryOptions({
queryKey: ["project"], queryKey: ["project"],
queryFn: () => queryFn: sdk
retry(() => ? () =>
sdk.project.list().then((x) => { retry(() =>
return (x.data ?? []) sdk.project
.filter((p) => !!p?.id) .list()
.filter((p) => !!p.worktree && !p.worktree.includes("opencode-test")) .then((x) => {
.slice() return (x.data ?? [])
.sort((a, b) => cmp(a.id, b.id)) .filter((p) => !!p?.id)
}), .filter((p) => !!p.worktree && !p.worktree.includes("opencode-test"))
), .slice()
.sort((a, b) => cmp(a.id, b.id))
})
.then(transform),
)
: skipToken,
}) })
export async function bootstrapGlobal(input: { export async function bootstrapGlobal(input: {
@@ -117,9 +136,9 @@ export async function bootstrapGlobal(input: {
() => input.queryClient.fetchQuery(loadProvidersQuery(null, input.globalSDK)), () => input.queryClient.fetchQuery(loadProvidersQuery(null, input.globalSDK)),
() => input.queryClient.fetchQuery(loadPathQuery(null, input.globalSDK)), () => input.queryClient.fetchQuery(loadPathQuery(null, input.globalSDK)),
() => () =>
input.queryClient input.queryClient.fetchQuery(
.fetchQuery(loadProjectsQuery(input.globalSDK)) loadProjectsQuery(input.globalSDK, (data) => input.setGlobalStore("project", data ?? [])),
.then((data) => input.setGlobalStore("project", data)), ),
] ]
await runAll(slow) await runAll(slow)
// showErrors({ // showErrors({
@@ -178,22 +197,46 @@ function warmSessions(input: {
).then(() => undefined) ).then(() => undefined)
} }
export const loadProvidersQuery = (directory: string | null, sdk: OpencodeClient) => export const loadProvidersQuery = (directory: string | null, sdk?: OpencodeClient) =>
queryOptions({ queryOptions({
queryKey: [directory, "providers"], queryKey: [directory, "providers"],
queryFn: () => retry(() => sdk.provider.list().then((x) => normalizeProviderList(x.data!))), queryFn: sdk ? () => retry(() => sdk.provider.list().then((x) => normalizeProviderList(x.data!))) : skipToken,
}) })
export const loadAgentsQuery = (directory: string | null, sdk: OpencodeClient) => export const loadAgentsQuery = (
directory: string | null,
sdk?: OpencodeClient,
transform?: (x: Awaited<ReturnType<OpencodeClient["app"]["agents"]>>) => void,
) =>
queryOptions({ queryOptions({
queryKey: [directory, "agents"], queryKey: [directory, "agents"],
queryFn: () => retry(() => sdk.app.agents().then((x) => normalizeAgentList(x.data))), queryFn: sdk
? () =>
retry(() =>
sdk.app.agents().then((x) => {
transform?.(x)
return x.data!
}),
)
: skipToken,
}) })
export const loadPathQuery = (directory: string | null, sdk: OpencodeClient) => export const loadPathQuery = (
directory: string | null,
sdk?: OpencodeClient,
transform?: (x: Awaited<ReturnType<OpencodeClient["path"]["get"]>>) => void,
) =>
queryOptions<Path>({ queryOptions<Path>({
queryKey: [directory, "path"], queryKey: [directory, "path"],
queryFn: () => retry(() => sdk.path.get().then((x) => x.data!)), queryFn: sdk
? () =>
retry(() =>
sdk.path.get().then(async (x) => {
transform?.(x)
return x.data!
}),
)
: skipToken,
}) })
export async function bootstrapDirectory(input: { export async function bootstrapDirectory(input: {
@@ -228,9 +271,9 @@ export async function bootstrapDirectory(input: {
const slow = [ const slow = [
() => Promise.resolve(input.loadSessions(input.directory)), () => Promise.resolve(input.loadSessions(input.directory)),
() => () =>
input.queryClient input.queryClient.ensureQueryData(
.ensureQueryData(loadAgentsQuery(input.directory, input.sdk)) loadAgentsQuery(input.directory, input.sdk, (x) => input.setStore("agent", normalizeAgentList(x.data))),
.then((data) => input.setStore("agent", data)), ),
() => () =>
retry(() => input.sdk.config.get().then((x) => input.setStore("config", reconcile(x.data!, { merge: false })))), retry(() => input.sdk.config.get().then((x) => input.setStore("config", reconcile(x.data!, { merge: false })))),
() => retry(() => input.sdk.session.status().then((x) => input.setStore("session_status", x.data!))), () => retry(() => input.sdk.session.status().then((x) => input.setStore("session_status", x.data!))),
@@ -238,10 +281,12 @@ export async function bootstrapDirectory(input: {
(() => retry(() => input.sdk.project.current()).then((x) => input.setStore("project", x.data!.id))), (() => retry(() => input.sdk.project.current()).then((x) => input.setStore("project", x.data!.id))),
!seededPath && !seededPath &&
(() => (() =>
input.queryClient.ensureQueryData(loadPathQuery(input.directory, input.sdk)).then((data) => { input.queryClient.ensureQueryData(
const next = projectID(data.directory ?? input.directory, input.global.project) loadPathQuery(input.directory, input.sdk, (x) => {
if (next) input.setStore("project", next) const next = projectID(x.data?.directory ?? input.directory, input.global.project)
})), if (next) input.setStore("project", next)
}),
)),
() => () =>
retry(() => retry(() =>
input.sdk.vcs.get().then((x) => { input.sdk.vcs.get().then((x) => {
@@ -22,7 +22,7 @@ describe("createChildStoreManager", () => {
onBootstrap() {}, onBootstrap() {},
onDispose() {}, onDispose() {},
translate: (key) => key, translate: (key) => key,
queryOptions: {} as any, getSdk: () => null!,
global: { provider: null! }, global: { provider: null! },
}) })
@@ -1,7 +1,7 @@
import { createRoot, getOwner, onCleanup, runWithOwner, type Owner } from "solid-js" import { createRoot, getOwner, onCleanup, runWithOwner, type Owner } from "solid-js"
import { createStore, type SetStoreFunction, type Store } from "solid-js/store" import { createStore, type SetStoreFunction, type Store } from "solid-js/store"
import { Persist, persisted } from "@/utils/persist" import { Persist, persisted } from "@/utils/persist"
import type { ProviderListResponse, VcsInfo } from "@opencode-ai/sdk/v2/client" import type { OpencodeClient, ProviderListResponse, VcsInfo } from "@opencode-ai/sdk/v2/client"
import { import {
DIR_IDLE_TTL_MS, DIR_IDLE_TTL_MS,
MAX_DIR_STORES, MAX_DIR_STORES,
@@ -15,7 +15,8 @@ import {
} from "./types" } from "./types"
import { canDisposeDirectory, pickDirectoriesToEvict } from "./eviction" import { canDisposeDirectory, pickDirectoriesToEvict } from "./eviction"
import { useQueries } from "@tanstack/solid-query" import { useQueries } from "@tanstack/solid-query"
import { QueryOptionsApi } from "../global-sync" import { loadPathQuery, loadProvidersQuery } from "./bootstrap"
import { loadLspQuery, loadMcpQuery } from "../global-sync"
import { directoryKey, type DirectoryKey } from "./utils" import { directoryKey, type DirectoryKey } from "./utils"
export function createChildStoreManager(input: { export function createChildStoreManager(input: {
@@ -25,7 +26,7 @@ export function createChildStoreManager(input: {
onBootstrap: (directory: string) => void onBootstrap: (directory: string) => void
onDispose: (directory: string) => void onDispose: (directory: string) => void
translate: (key: string, vars?: Record<string, string | number>) => string translate: (key: string, vars?: Record<string, string | number>) => string
queryOptions: QueryOptionsApi getSdk: (directory: string) => OpencodeClient
global: { global: {
provider: ProviderListResponse provider: ProviderListResponse
} }
@@ -170,15 +171,17 @@ export function createChildStoreManager(input: {
const init = () => const init = () =>
createRoot((dispose) => { createRoot((dispose) => {
const sdk = input.getSdk(directory)
const initialMeta = meta[0].value const initialMeta = meta[0].value
const initialIcon = icon[0].value const initialIcon = icon[0].value
const [pathQuery, mcpQuery, lspQuery, providerQuery] = useQueries(() => ({ const [pathQuery, mcpQuery, lspQuery, providerQuery] = useQueries(() => ({
queries: [ queries: [
input.queryOptions.path(key), loadPathQuery(key, sdk),
input.queryOptions.mcp(key), loadMcpQuery(key, sdk),
input.queryOptions.lsp(key), loadLspQuery(key, sdk),
input.queryOptions.providers(key), loadProvidersQuery(key, sdk),
], ],
})) }))
@@ -208,10 +211,6 @@ export function createChildStoreManager(input: {
session: [], session: [],
sessionTotal: 0, sessionTotal: 0,
session_status: {}, session_status: {},
session_working(id: string) {
const type = this.session_status[id]?.type
return (type ?? "idle") !== "idle"
},
session_diff: {}, session_diff: {},
todo: {}, todo: {},
permission: {}, permission: {},
@@ -232,7 +231,6 @@ export function createChildStoreManager(input: {
limit: 5, limit: 5,
message: {}, message: {},
part: {}, part: {},
part_text_accum_delta: {},
}) })
children[key] = child children[key] = child
disposers.set(key, dispose) disposers.set(key, dispose)
@@ -81,7 +81,6 @@ const baseState = (input: Partial<State> = {}) =>
limit: 10, limit: 10,
message: {}, message: {},
part: {}, part: {},
part_text_accum_delta: {},
...input, ...input,
}) as State }) as State
@@ -125,7 +125,6 @@ export function applyDirectoryEvent(input: {
const info = (event.properties as { info: Session }).info const info = (event.properties as { info: Session }).info
const result = Binary.search(input.store.session, info.id, (s) => s.id) const result = Binary.search(input.store.session, info.id, (s) => s.id)
if (info.time.archived) { if (info.time.archived) {
if (input.store.session[result.index]!.time.archived === info.time.archived) break
if (result.found) { if (result.found) {
input.setStore( input.setStore(
"session", "session",
@@ -212,12 +211,6 @@ export function applyDirectoryEvent(input: {
const result = Binary.search(messages, props.messageID, (m) => m.id) const result = Binary.search(messages, props.messageID, (m) => m.id)
if (result.found) messages.splice(result.index, 1) if (result.found) messages.splice(result.index, 1)
} }
const parts = draft.part[props.messageID]
if (parts) {
for (const part of parts) {
delete draft.part_text_accum_delta[part.id]
}
}
delete draft.part[props.messageID] delete draft.part[props.messageID]
}), }),
) )
@@ -226,11 +219,6 @@ export function applyDirectoryEvent(input: {
case "message.part.updated": { case "message.part.updated": {
const part = (event.properties as { part: Part }).part const part = (event.properties as { part: Part }).part
if (SKIP_PARTS.has(part.type)) break if (SKIP_PARTS.has(part.type)) break
input.setStore(
produce((draft) => {
delete draft.part_text_accum_delta[part.id]
}),
)
const parts = input.store.part[part.messageID] const parts = input.store.part[part.messageID]
if (!parts) { if (!parts) {
input.setStore("part", part.messageID, [part]) input.setStore("part", part.messageID, [part])
@@ -252,11 +240,6 @@ export function applyDirectoryEvent(input: {
} }
case "message.part.removed": { case "message.part.removed": {
const props = event.properties as { messageID: string; partID: string } const props = event.properties as { messageID: string; partID: string }
input.setStore(
produce((draft) => {
delete draft.part_text_accum_delta[props.partID]
}),
)
const parts = input.store.part[props.messageID] const parts = input.store.part[props.messageID]
if (!parts) break if (!parts) break
const result = Binary.search(parts, props.partID, (p) => p.id) const result = Binary.search(parts, props.partID, (p) => p.id)
@@ -280,7 +263,6 @@ export function applyDirectoryEvent(input: {
if (!parts) break if (!parts) break
const result = Binary.search(parts, props.partID, (p) => p.id) const result = Binary.search(parts, props.partID, (p) => p.id)
if (!result.found) break if (!result.found) break
input.setStore("part_text_accum_delta", props.partID, (existing) => (existing ?? "") + props.delta)
input.setStore( input.setStore(
"part", "part",
props.messageID, props.messageID,
@@ -39,7 +39,6 @@ describe("app session cache", () => {
part: Record<string, Part[] | undefined> part: Record<string, Part[] | undefined>
permission: Record<string, PermissionRequest[] | undefined> permission: Record<string, PermissionRequest[] | undefined>
question: Record<string, QuestionRequest[] | undefined> question: Record<string, QuestionRequest[] | undefined>
part_text_accum_delta: Record<string, string | undefined>
} = { } = {
session_status: { ses_1: { type: "busy" } as SessionStatus }, session_status: { ses_1: { type: "busy" } as SessionStatus },
session_diff: { ses_1: [] }, session_diff: { ses_1: [] },
@@ -48,14 +47,12 @@ describe("app session cache", () => {
part: { msg_1: [part("prt_1", "ses_1", "msg_1")] }, part: { msg_1: [part("prt_1", "ses_1", "msg_1")] },
permission: { ses_1: [] as PermissionRequest[] }, permission: { ses_1: [] as PermissionRequest[] },
question: { ses_1: [] as QuestionRequest[] }, question: { ses_1: [] as QuestionRequest[] },
part_text_accum_delta: { prt_1: "streamed text" },
} }
dropSessionCaches(store, ["ses_1"]) dropSessionCaches(store, ["ses_1"])
expect(store.message.ses_1).toBeUndefined() expect(store.message.ses_1).toBeUndefined()
expect(store.part.msg_1).toBeUndefined() expect(store.part.msg_1).toBeUndefined()
expect(store.part_text_accum_delta.prt_1).toBeUndefined()
expect(store.todo.ses_1).toBeUndefined() expect(store.todo.ses_1).toBeUndefined()
expect(store.session_diff.ses_1).toBeUndefined() expect(store.session_diff.ses_1).toBeUndefined()
expect(store.session_status.ses_1).toBeUndefined() expect(store.session_status.ses_1).toBeUndefined()
@@ -73,7 +70,6 @@ describe("app session cache", () => {
part: Record<string, Part[] | undefined> part: Record<string, Part[] | undefined>
permission: Record<string, PermissionRequest[] | undefined> permission: Record<string, PermissionRequest[] | undefined>
question: Record<string, QuestionRequest[] | undefined> question: Record<string, QuestionRequest[] | undefined>
part_text_accum_delta: Record<string, string | undefined>
} = { } = {
session_status: {}, session_status: {},
session_diff: {}, session_diff: {},
@@ -82,7 +78,6 @@ describe("app session cache", () => {
part: { [m.id]: [part("prt_1", "ses_1", m.id)] }, part: { [m.id]: [part("prt_1", "ses_1", m.id)] },
permission: {}, permission: {},
question: {}, question: {},
part_text_accum_delta: {},
} }
dropSessionCaches(store, ["ses_1"]) dropSessionCaches(store, ["ses_1"])
@@ -18,7 +18,6 @@ type SessionCache = {
part: Record<string, Part[] | undefined> part: Record<string, Part[] | undefined>
permission: Record<string, PermissionRequest[] | undefined> permission: Record<string, PermissionRequest[] | undefined>
question: Record<string, QuestionRequest[] | undefined> question: Record<string, QuestionRequest[] | undefined>
part_text_accum_delta: Record<string, string | undefined>
} }
export function dropSessionCaches(store: SessionCache, sessionIDs: Iterable<string>) { export function dropSessionCaches(store: SessionCache, sessionIDs: Iterable<string>) {
@@ -28,9 +27,6 @@ export function dropSessionCaches(store: SessionCache, sessionIDs: Iterable<stri
for (const key of Object.keys(store.part)) { for (const key of Object.keys(store.part)) {
const parts = store.part[key] const parts = store.part[key]
if (!parts?.some((part) => stale.has(part?.sessionID ?? ""))) continue if (!parts?.some((part) => stale.has(part?.sessionID ?? ""))) continue
for (const part of parts) {
delete store.part_text_accum_delta[part.id]
}
delete store.part[key] delete store.part[key]
} }
@@ -46,7 +46,6 @@ export type State = {
session_status: { session_status: {
[sessionID: string]: SessionStatus [sessionID: string]: SessionStatus
} }
session_working(id: string): boolean
session_diff: { session_diff: {
[sessionID: string]: SnapshotFileDiff[] [sessionID: string]: SnapshotFileDiff[]
} }
@@ -73,9 +72,6 @@ export type State = {
part: { part: {
[messageID: string]: Part[] [messageID: string]: Part[]
} }
part_text_accum_delta: {
[partID: string]: string
}
} }
export type VcsCache = { export type VcsCache = {
-13
View File
@@ -43,7 +43,6 @@ type SessionView = {
reviewOpen?: string[] reviewOpen?: string[]
pendingMessage?: string pendingMessage?: string
pendingMessageAt?: number pendingMessageAt?: number
todoCollapsed?: boolean
} }
type TabHandoff = { type TabHandoff = {
@@ -760,18 +759,6 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
setScroll(tab: string, pos: SessionScroll) { setScroll(tab: string, pos: SessionScroll) {
scroll.setScroll(key(), tab, pos) scroll.setScroll(key(), tab, pos)
}, },
todoCollapsed: {
get: () => s().todoCollapsed ?? false,
set(collapsed: boolean) {
const session = key()
const current = store.sessionView[session]
if (!current) {
setStore("sessionView", session, { scroll: {}, todoCollapsed: collapsed })
} else {
setStore("sessionView", session, "todoCollapsed", collapsed)
}
},
},
terminal: { terminal: {
opened: terminalOpened, opened: terminalOpened,
open() { open() {
+5 -13
View File
@@ -44,7 +44,7 @@ const migrate = (value: unknown) => {
} }
const clone = (value: State | undefined) => { const clone = (value: State | undefined) => {
if (!value) return if (!value) return undefined
return { return {
...value, ...value,
model: value.model ? { ...value.model } : undefined, model: value.model ? { ...value.model } : undefined,
@@ -104,7 +104,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
const pickAgent = (name: string | undefined) => { const pickAgent = (name: string | undefined) => {
const items = list() const items = list()
if (items.length === 0) return if (items.length === 0) return undefined
return items.find((item) => item.name === name) ?? items[0] return items.find((item) => item.name === name) ?? items[0]
} }
@@ -227,14 +227,14 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
() => agent.current()?.model, () => agent.current()?.model,
fallback, fallback,
) )
if (!item) return if (!item) return undefined
return models.find(item) return models.find(item)
} }
const configured = () => { const configured = () => {
const item = agent.current() const item = agent.current()
const model = current() const model = current()
if (!item || !model) return if (!item || !model) return undefined
return getConfiguredAgentVariant({ return getConfiguredAgentVariant({
agent: { model: item.model, variant: item.variant }, agent: { model: item.model, variant: item.variant },
model: { providerID: model.provider.id, modelID: model.id, variants: model.variants }, model: { providerID: model.provider.id, modelID: model.id, variants: model.variants },
@@ -314,16 +314,11 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
configured, configured,
selected, selected,
current() { current() {
const resolved = resolveModelVariant({ return resolveModelVariant({
variants: this.list(), variants: this.list(),
selected: this.selected(), selected: this.selected(),
configured: this.configured(), configured: this.configured(),
}) })
if (resolved) return resolved
const model = current()
if (!model) return
const saved = models.variant.get({ providerID: model.provider.id, modelID: model.id })
if (saved && this.list().includes(saved)) return saved
}, },
list() { list() {
const item = current() const item = current()
@@ -340,9 +335,6 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
variant: value ?? null, variant: value ?? null,
}) })
write({ variant: value ?? null }) write({ variant: value ?? null })
if (model) {
models.variant.set({ providerID: model.provider.id, modelID: model.id }, value ?? undefined)
}
}) })
}, },
cycle() { cycle() {
-1
View File
@@ -276,7 +276,6 @@ export const dict = {
"mcp.status.connected": "متصل", "mcp.status.connected": "متصل",
"mcp.status.failed": "فشل", "mcp.status.failed": "فشل",
"mcp.status.needs_auth": "يحتاج إلى مصادقة", "mcp.status.needs_auth": "يحتاج إلى مصادقة",
"mcp.auth.clickToAuthenticate": "انقر للمصادقة",
"mcp.status.disabled": "معطل", "mcp.status.disabled": "معطل",
"dialog.fork.empty": "لا توجد رسائل للتفرع منها", "dialog.fork.empty": "لا توجد رسائل للتفرع منها",
"dialog.directory.search.placeholder": "البحث في المجلدات", "dialog.directory.search.placeholder": "البحث في المجلدات",
-1
View File
@@ -276,7 +276,6 @@ export const dict = {
"mcp.status.connected": "conectado", "mcp.status.connected": "conectado",
"mcp.status.failed": "falhou", "mcp.status.failed": "falhou",
"mcp.status.needs_auth": "precisa de autenticação", "mcp.status.needs_auth": "precisa de autenticação",
"mcp.auth.clickToAuthenticate": "Clique para autenticar",
"mcp.status.disabled": "desabilitado", "mcp.status.disabled": "desabilitado",
"dialog.fork.empty": "Nenhuma mensagem para bifurcar", "dialog.fork.empty": "Nenhuma mensagem para bifurcar",
"dialog.directory.search.placeholder": "Buscar pastas", "dialog.directory.search.placeholder": "Buscar pastas",
-1
View File
@@ -300,7 +300,6 @@ export const dict = {
"mcp.status.connected": "povezano", "mcp.status.connected": "povezano",
"mcp.status.failed": "neuspjelo", "mcp.status.failed": "neuspjelo",
"mcp.status.needs_auth": "potrebna autentifikacija", "mcp.status.needs_auth": "potrebna autentifikacija",
"mcp.auth.clickToAuthenticate": "Kliknite za autentifikaciju",
"mcp.status.disabled": "onemogućeno", "mcp.status.disabled": "onemogućeno",
"dialog.fork.empty": "Nema poruka za fork", "dialog.fork.empty": "Nema poruka za fork",
-1
View File
@@ -298,7 +298,6 @@ export const dict = {
"mcp.status.connected": "forbundet", "mcp.status.connected": "forbundet",
"mcp.status.failed": "mislykkedes", "mcp.status.failed": "mislykkedes",
"mcp.status.needs_auth": "kræver godkendelse", "mcp.status.needs_auth": "kræver godkendelse",
"mcp.auth.clickToAuthenticate": "Klik for at godkende",
"mcp.status.disabled": "deaktiveret", "mcp.status.disabled": "deaktiveret",
"dialog.fork.empty": "Ingen beskeder at forgrene fra", "dialog.fork.empty": "Ingen beskeder at forgrene fra",
-1
View File
@@ -282,7 +282,6 @@ export const dict = {
"mcp.status.connected": "verbunden", "mcp.status.connected": "verbunden",
"mcp.status.failed": "fehlgeschlagen", "mcp.status.failed": "fehlgeschlagen",
"mcp.status.needs_auth": "benötigt Authentifizierung", "mcp.status.needs_auth": "benötigt Authentifizierung",
"mcp.auth.clickToAuthenticate": "Zum Authentifizieren klicken",
"mcp.status.disabled": "deaktiviert", "mcp.status.disabled": "deaktiviert",
"dialog.fork.empty": "Keine Nachrichten zum Abzweigen vorhanden", "dialog.fork.empty": "Keine Nachrichten zum Abzweigen vorhanden",
"dialog.directory.search.placeholder": "Ordner durchsuchen", "dialog.directory.search.placeholder": "Ordner durchsuchen",
+1 -3
View File
@@ -25,7 +25,6 @@ export const dict = {
"command.project.open": "Open project", "command.project.open": "Open project",
"command.project.previous": "Previous project", "command.project.previous": "Previous project",
"command.project.next": "Next project", "command.project.next": "Next project",
"command.project.index": "Switch to project {{index}}",
"command.provider.connect": "Connect provider", "command.provider.connect": "Connect provider",
"command.server.switch": "Switch server", "command.server.switch": "Switch server",
"command.settings.open": "Open settings", "command.settings.open": "Open settings",
@@ -306,7 +305,6 @@ export const dict = {
"mcp.status.failed": "failed", "mcp.status.failed": "failed",
"mcp.status.needs_auth": "needs auth", "mcp.status.needs_auth": "needs auth",
"mcp.status.disabled": "disabled", "mcp.status.disabled": "disabled",
"mcp.auth.clickToAuthenticate": "Click to authenticate",
"dialog.fork.empty": "No messages to fork from", "dialog.fork.empty": "No messages to fork from",
@@ -903,7 +901,7 @@ export const dict = {
"settings.permissions.tool.read.title": "Read", "settings.permissions.tool.read.title": "Read",
"settings.permissions.tool.read.description": "Reading a file (matches the file path)", "settings.permissions.tool.read.description": "Reading a file (matches the file path)",
"settings.permissions.tool.edit.title": "Edit", "settings.permissions.tool.edit.title": "Edit",
"settings.permissions.tool.edit.description": "Modify files, including edits, writes, and patches", "settings.permissions.tool.edit.description": "Modify files, including edits, writes, patches, and multi-edits",
"settings.permissions.tool.glob.title": "Glob", "settings.permissions.tool.glob.title": "Glob",
"settings.permissions.tool.glob.description": "Match files using glob patterns", "settings.permissions.tool.glob.description": "Match files using glob patterns",
"settings.permissions.tool.grep.title": "Grep", "settings.permissions.tool.grep.title": "Grep",
-1
View File
@@ -299,7 +299,6 @@ export const dict = {
"mcp.status.connected": "conectado", "mcp.status.connected": "conectado",
"mcp.status.failed": "fallido", "mcp.status.failed": "fallido",
"mcp.status.needs_auth": "necesita auth", "mcp.status.needs_auth": "necesita auth",
"mcp.auth.clickToAuthenticate": "Haz clic para autenticar",
"mcp.status.disabled": "deshabilitado", "mcp.status.disabled": "deshabilitado",
"dialog.fork.empty": "No hay mensajes desde donde bifurcar", "dialog.fork.empty": "No hay mensajes desde donde bifurcar",

Some files were not shown because too many files have changed in this diff Show More