Skip to content

Commit b7b016f

Browse files
committed
Merge branch 'dev' into feat/canceled-prompts-in-history
2 parents 5ba2d7e + e35a413 commit b7b016f

98 files changed

Lines changed: 1549 additions & 717 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/setup-bun/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ runs:
44
using: "composite"
55
steps:
66
- name: Mount Bun Cache
7+
if: ${{ runner.os == 'Linux' }}
78
uses: useblacksmith/stickydisk@v1
89
with:
910
key: ${{ github.repository }}-bun-cache-${{ runner.os }}

.github/workflows/publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,18 @@ jobs:
137137
if: contains(matrix.settings.host, 'ubuntu')
138138
uses: actions/cache@v4
139139
with:
140-
path: /var/cache/apt/archives
140+
path: ~/apt-cache
141141
key: ${{ runner.os }}-${{ matrix.settings.target }}-apt-${{ hashFiles('.github/workflows/publish.yml') }}
142142
restore-keys: |
143143
${{ runner.os }}-${{ matrix.settings.target }}-apt-
144144
145145
- name: install dependencies (ubuntu only)
146146
if: contains(matrix.settings.host, 'ubuntu')
147147
run: |
148+
mkdir -p ~/apt-cache && chmod -R a+rw ~/apt-cache
148149
sudo apt-get update
149-
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
150+
sudo apt-get install -y --no-install-recommends -o dir::cache::archives="$HOME/apt-cache" libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
151+
sudo chmod -R a+rw ~/apt-cache
150152
151153
- name: install Rust stable
152154
uses: dtolnay/rust-toolchain@stable

.opencode/agent/translator.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ opencode serve --hostname 0.0.0.0 --port 4096
359359
opencode serve [--port <number>] [--hostname <string>] [--cors <origin>]
360360
opencode session [command]
361361
opencode session list
362+
opencode session delete <sessionID>
362363
opencode stats
363364
opencode uninstall
364365
opencode upgrade
@@ -598,6 +599,7 @@ OPENCODE_EXPERIMENTAL_MARKDOWN
598599
OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX
599600
OPENCODE_EXPERIMENTAL_OXFMT
600601
OPENCODE_EXPERIMENTAL_PLAN_MODE
602+
OPENCODE_ENABLE_QUESTION_TOOL
601603
OPENCODE_FAKE_VCS
602604
OPENCODE_GIT_BASH_PATH
603605
OPENCODE_MODEL

.opencode/opencode.jsonc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"$schema": "https://opencode.ai/config.json",
3-
// "enterprise": {
4-
// "url": "https://enterprise.dev.opencode.ai",
5-
// },
63
"provider": {
74
"opencode": {
85
"options": {},

bun.lock

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/hashes.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"nodeModules": {
3-
"x86_64-linux": "sha256-5pgd2xuvIIkTbIOGIdK5MIXo6O9qRpvk1RKQZ1e1R+8=",
4-
"aarch64-linux": "sha256-FZiHwihM4b82ipQ9XfW08X+sd5CvZhx/+pU/8X1zsns=",
5-
"aarch64-darwin": "sha256-iZv0w1NthV53pY5uvuf3JlI14GeKmCu7WHwGSRdEQeM=",
6-
"x86_64-darwin": "sha256-c3Zm3P1goFPgg3vNAZPMFOhHX/gyTmsCN/PKbGO/v0E="
3+
"x86_64-linux": "sha256-C3WIEER2XgzO85wk2sp3BzQ6dknW026zslD8nKZjo2U=",
4+
"aarch64-linux": "sha256-+tTJHZMZ/+8fAjI/1fUTuca8J2MZfB+5vhBoZ7jgqcE=",
5+
"aarch64-darwin": "sha256-vS82puFGBBToxyIBa8Zi0KLKdJYr64T6HZL2rL32mH8=",
6+
"x86_64-darwin": "sha256-Tr8JMTCxV6WVt3dXV7iq3PNCm2Cn+RXAbU9+o7pKKV0="
77
}
88
}

packages/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencode-ai/app",
3-
"version": "1.2.4",
3+
"version": "1.2.6",
44
"description": "",
55
"type": "module",
66
"exports": {

packages/app/src/pages/session.tsx

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { useSync } from "@/context/sync"
2323
import { useTerminal, type LocalPTY } from "@/context/terminal"
2424
import { useLayout } from "@/context/layout"
2525
import { checksum, base64Encode } from "@opencode-ai/util/encode"
26-
import { findLast } from "@opencode-ai/util/array"
2726
import { useDialog } from "@opencode-ai/ui/context/dialog"
2827
import { DialogSelectFile } from "@/components/dialog-select-file"
2928
import FileTree from "@/components/file-tree"
@@ -35,7 +34,6 @@ import { useSDK } from "@/context/sdk"
3534
import { usePrompt } from "@/context/prompt"
3635
import { useComments } from "@/context/comments"
3736
import { ConstrainDragYAxis, getDraggableId } from "@/utils/solid-dnd"
38-
import { usePermission } from "@/context/permission"
3937
import { showToast } from "@opencode-ai/ui/toast"
4038
import { SessionHeader, SessionContextTab, SortableTab, FileVisual, NewSessionView } from "@/components/session"
4139
import { navMark, navParams } from "@/utils/perf"
@@ -101,7 +99,6 @@ export default function Page() {
10199
const sdk = useSDK()
102100
const prompt = usePrompt()
103101
const comments = useComments()
104-
const permission = usePermission()
105102

106103
const permRequest = createMemo(() => {
107104
const sessionID = params.id
@@ -272,6 +269,7 @@ export default function Page() {
272269
if (!path) return
273270
file.load(path)
274271
openReviewPanel()
272+
tabs().setActive(next)
275273
}
276274

277275
createEffect(() => {
@@ -769,11 +767,6 @@ export default function Page() {
769767
return lines.slice(0, 2).join("\n")
770768
}
771769

772-
const addSelectionToContext = (path: string, selection: FileSelection) => {
773-
const preview = selectionPreview(path, selection)
774-
prompt.context.add({ type: "file", path, selection, preview })
775-
}
776-
777770
const addCommentToContext = (input: {
778771
file: string
779772
selection: SelectedLineRange
@@ -912,31 +905,11 @@ export default function Page() {
912905
const focusInput = () => inputRef?.focus()
913906

914907
useSessionCommands({
915-
command,
916-
dialog,
917-
file,
918-
language,
919-
local,
920-
permission,
921-
prompt,
922-
sdk,
923-
sync,
924-
terminal,
925-
layout,
926-
params,
927-
navigate,
928-
tabs,
929-
view,
930-
info,
931-
status,
932-
userMessages,
933-
visibleUserMessages,
934908
activeMessage,
935909
showAllFiles,
936910
navigateMessageByOffset,
937911
setExpanded: (id, fn) => setStore("expanded", id, fn),
938912
setActiveMessage,
939-
addSelectionToContext,
940913
focusInput,
941914
})
942915

packages/app/src/pages/session/helpers.test.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, test } from "bun:test"
2-
import { combineCommandSections, createOpenReviewFile, focusTerminalById, getTabReorderIndex } from "./helpers"
2+
import { createOpenReviewFile, focusTerminalById, getTabReorderIndex } from "./helpers"
33

44
describe("createOpenReviewFile", () => {
55
test("opens and loads selected review file", () => {
@@ -46,20 +46,6 @@ describe("focusTerminalById", () => {
4646
})
4747
})
4848

49-
describe("combineCommandSections", () => {
50-
test("keeps section order stable", () => {
51-
const result = combineCommandSections([
52-
[{ id: "a", title: "A" }],
53-
[
54-
{ id: "b", title: "B" },
55-
{ id: "c", title: "C" },
56-
],
57-
])
58-
59-
expect(result.map((item) => item.id)).toEqual(["a", "b", "c"])
60-
})
61-
})
62-
6349
describe("getTabReorderIndex", () => {
6450
test("returns target index for valid drag reorder", () => {
6551
expect(getTabReorderIndex(["a", "b", "c"], "a", "c")).toBe(2)

packages/app/src/pages/session/helpers.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { CommandOption } from "@/context/command"
21
import { batch } from "solid-js"
32

43
export const focusTerminalById = (id: string) => {
@@ -36,10 +35,6 @@ export const createOpenReviewFile = (input: {
3635
}
3736
}
3837

39-
export const combineCommandSections = (sections: readonly (readonly CommandOption[])[]) => {
40-
return sections.flatMap((section) => section)
41-
}
42-
4338
export const getTabReorderIndex = (tabs: readonly string[], from: string, to: string) => {
4439
const fromIndex = tabs.indexOf(from)
4540
const toIndex = tabs.indexOf(to)

0 commit comments

Comments
 (0)