Skip to content

Commit d5dcadc

Browse files
committed
Merge branch 'dev' into feat/canceled-prompts-in-history
2 parents 0c154e6 + 8ad5262 commit d5dcadc

59 files changed

Lines changed: 640 additions & 268 deletions

Some content is hidden

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

bun.lock

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

flake.lock

Lines changed: 3 additions & 3 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-FMrW0aXYOgRe3ginr4l1LwCszsD/r5CQkvRU6HHA7iw=",
4-
"aarch64-linux": "sha256-NZTtIsFZshWOp5mVFvrcVeHUlx62QcsSJKPYjwPhmYk=",
5-
"aarch64-darwin": "sha256-6cWt8KaqojTJ/b3WSYb3dDPTNuKBDt9Fxx6p/WGBnik=",
6-
"x86_64-darwin": "sha256-F6zuxV34RQ9RTjH0c22rGZaPrhemhRUPi+OkF+Y0ytM="
3+
"x86_64-linux": "sha256-UBz5qXhO+Xy6XptVdbo9V0wKsvZgItmHkWDm6I5VRCk=",
4+
"aarch64-linux": "sha256-G2ezu/ThZR3kYfHnbD0EOcLoAa6hwtICpmo9r+bqibE=",
5+
"aarch64-darwin": "sha256-PhSE23OzNlyfNFP5LffA3AtyN+hsyCeGInmDBBRjr0g=",
6+
"x86_64-darwin": "sha256-vWusYJD+7ClDLUFy1wEqRLf9hY8V43iqdqnZ6YWkh1Q="
77
}
88
}

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "AI-powered development tool",
55
"private": true,
66
"type": "module",
7-
"packageManager": "bun@1.3.5",
7+
"packageManager": "bun@1.3.8",
88
"scripts": {
99
"dev": "bun run --cwd packages/opencode --conditions=browser src/index.ts",
1010
"dev:desktop": "bun --cwd packages/desktop tauri dev",
@@ -23,7 +23,7 @@
2323
"packages/slack"
2424
],
2525
"catalog": {
26-
"@types/bun": "1.3.5",
26+
"@types/bun": "1.3.8",
2727
"@octokit/rest": "22.0.0",
2828
"@hono/zod-validator": "0.4.2",
2929
"ulid": "3.0.1",
@@ -100,5 +100,7 @@
100100
"@types/bun": "catalog:",
101101
"@types/node": "catalog:"
102102
},
103-
"patchedDependencies": {}
103+
"patchedDependencies": {
104+
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch"
105+
}
104106
}

packages/app/src/components/dialog-edit-project.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export function DialogEditProject(props: { project: LocalProject }) {
223223
value={store.startup}
224224
onChange={(v) => setStore("startup", v)}
225225
spellcheck={false}
226-
class="max-h-40 w-full font-mono text-xs no-scrollbar"
226+
class="max-h-14 w-full overflow-y-auto font-mono text-xs"
227227
/>
228228
</div>
229229

packages/app/src/components/file-tree.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ import {
1919
import { Dynamic } from "solid-js/web"
2020
import type { FileNode } from "@opencode-ai/sdk/v2"
2121

22+
function pathToFileUrl(filepath: string): string {
23+
const encodedPath = filepath
24+
.split("/")
25+
.map((segment) => encodeURIComponent(segment))
26+
.join("/")
27+
return `file://${encodedPath}`
28+
}
29+
2230
type Kind = "add" | "del" | "mix"
2331

2432
type Filter = {
@@ -247,7 +255,7 @@ export default function FileTree(props: {
247255
onDragStart={(e: DragEvent) => {
248256
if (!draggable()) return
249257
e.dataTransfer?.setData("text/plain", `file:${local.node.path}`)
250-
e.dataTransfer?.setData("text/uri-list", `file://${local.node.path}`)
258+
e.dataTransfer?.setData("text/uri-list", pathToFileUrl(local.node.path))
251259
if (e.dataTransfer) e.dataTransfer.effectAllowed = "copy"
252260

253261
const dragImage = document.createElement("div")

packages/app/src/components/prompt-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
10231023
options={local.agent.list().map((agent) => agent.name)}
10241024
current={local.agent.current()?.name ?? ""}
10251025
onSelect={local.agent.set}
1026-
class={`capitalize ${local.model.variant.list().length > 0 ? "max-w-[80px]" : "max-w-[120px]"}`}
1026+
class={`capitalize ${local.model.variant.list().length > 0 ? "max-w-full" : "max-w-[120px]"}`}
10271027
valueClass="truncate"
10281028
variant="ghost"
10291029
/>

packages/app/src/components/prompt-input/build-request-parts.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ type BuildRequestPartsInput = {
3030
const absolute = (directory: string, path: string) =>
3131
path.startsWith("/") ? path : (directory + "/" + path).replace("//", "/")
3232

33+
const encodeFilePath = (filepath: string): string =>
34+
filepath
35+
.split("/")
36+
.map((segment) => encodeURIComponent(segment))
37+
.join("/")
38+
3339
const fileQuery = (selection: FileSelection | undefined) =>
3440
selection ? `?start=${selection.startLine}&end=${selection.endLine}` : ""
3541

@@ -99,7 +105,7 @@ export function buildRequestParts(input: BuildRequestPartsInput) {
99105
id: Identifier.ascending("part"),
100106
type: "file",
101107
mime: "text/plain",
102-
url: `file://${path}${fileQuery(attachment.selection)}`,
108+
url: `file://${encodeFilePath(path)}${fileQuery(attachment.selection)}`,
103109
filename: getFilename(attachment.path),
104110
source: {
105111
type: "file",
@@ -129,7 +135,7 @@ export function buildRequestParts(input: BuildRequestPartsInput) {
129135
const used = new Set(files.map((part) => part.url))
130136
const context = input.context.flatMap((item) => {
131137
const path = absolute(input.sessionDirectory, item.path)
132-
const url = `file://${path}${fileQuery(item.selection)}`
138+
const url = `file://${encodeFilePath(path)}${fileQuery(item.selection)}`
133139
const comment = item.comment?.trim()
134140
if (!comment && used.has(url)) return []
135141
used.add(url)

packages/app/src/components/session/session-header.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,7 @@ export function SessionHeader() {
544544
<Button
545545
variant="ghost"
546546
class="group/file-tree-toggle size-6 p-0"
547-
onClick={() => {
548-
const opening = !layout.fileTree.opened()
549-
if (opening && !view().reviewPanel.opened()) view().reviewPanel.open()
550-
layout.fileTree.toggle()
551-
}}
547+
onClick={() => layout.fileTree.toggle()}
552548
aria-label={language.t("command.fileTree.toggle")}
553549
aria-expanded={layout.fileTree.opened()}
554550
aria-controls="file-tree-panel"

packages/app/src/components/settings-keybinds.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function groupFor(id: string): KeybindGroup {
4444
if (id === PALETTE_ID) return "General"
4545
if (id.startsWith("terminal.")) return "Terminal"
4646
if (id.startsWith("model.") || id.startsWith("agent.") || id.startsWith("mcp.")) return "Model and agent"
47-
if (id.startsWith("file.")) return "Navigation"
47+
if (id.startsWith("file.") || id.startsWith("fileTree.")) return "Navigation"
4848
if (id.startsWith("prompt.")) return "Prompt"
4949
if (
5050
id.startsWith("session.") ||

0 commit comments

Comments
 (0)