Compare commits

..

8 Commits

Author SHA1 Message Date
Dax Raad b536b45536 Fix AUR SSH key path handling in publish script
Quote and trim AUR_KEY environment variable to handle paths with spaces and multiline content properly.

🤖 Generated with [OpenCode](https://opencode.ai)

Co-Authored-By: OpenCode <noreply@opencode.ai>
2025-06-12 13:37:12 -04:00
Dax Raad 81c245035f Simplify BunProc.which() to use process.execPath directly
🤖 Generated with [OpenCode](https://opencode.ai)

Co-Authored-By: OpenCode <noreply@opencode.ai>
2025-06-12 13:32:31 -04:00
Dax Raad dda7059e57 update bun integration
🤖 Generated with [OpenCode](https://opencode.ai)

Co-Authored-By: OpenCode <noreply@opencode.ai>
2025-06-12 13:29:14 -04:00
Dax Raad 0cca75ef48 sync 2025-06-12 13:19:24 -04:00
Dax Raad ee1f55dbe2 token 2025-06-12 13:17:06 -04:00
Dax Raad 2fa50190e5 skip nil values 2025-06-12 13:13:34 -04:00
Jay V 662b6b1258 share page handle undefined 2025-06-12 13:11:34 -04:00
Dax Raad f0dbe40522 sync 2025-06-12 13:04:01 -04:00
6 changed files with 38 additions and 17 deletions
@@ -1,4 +1,4 @@
name: release
name: publish
on:
workflow_dispatch:
@@ -13,7 +13,7 @@ permissions:
packages: write
jobs:
goreleaser:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -39,4 +39,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
+3 -3
View File
@@ -58,7 +58,7 @@ for (const [os, arch] of targets) {
),
)
if (!dry)
await $`cd dist/${name} && npm publish --access public --tag ${npmTag}`
await $`cd dist/${name} && bun publish --access public --tag ${npmTag}`
optionalDependencies[name] = version
}
@@ -83,7 +83,7 @@ await Bun.file(`./dist/${pkg.name}/package.json`).write(
),
)
if (!dry)
await $`cd ./dist/${pkg.name} && npm publish --access public --tag ${npmTag}`
await $`cd ./dist/${pkg.name} && bun publish --access public --tag ${npmTag}`
if (!snapshot) {
// Github Release
@@ -145,7 +145,7 @@ if (!snapshot) {
await $`rm -rf ./dist/aur-opencode-bin`
const gitEnv: Record<string, string> = process.env["AUR_KEY"]
? { GIT_SSH_COMMAND: `ssh -i ${process.env["AUR_KEY"]}` }
? { GIT_SSH_COMMAND: `ssh -i "${process.env["AUR_KEY"].trim()}"` }
: {}
await $`git clone ssh://aur@aur.archlinux.org/opencode-bin.git ./dist/aur-opencode-bin`.env(
+1 -3
View File
@@ -28,8 +28,6 @@ export namespace BunProc {
}
export function which() {
return process.argv0 !== "bun"
? path.resolve(process.cwd(), process.argv0)
: "bun"
return process.execPath
}
}
@@ -484,6 +484,9 @@ func renderArgs(args *map[string]any, titleKey string) string {
title := ""
parts := []string{}
for key, value := range *args {
if value == nil {
continue
}
if key == "filePath" || key == "path" {
value = relative(value.(string))
}
+24 -7
View File
@@ -167,6 +167,8 @@ export function getDiagnostics(
): string[] {
const result: string[] = []
if (diagnosticsByFile === undefined) return result
for (const diags of Object.values(diagnosticsByFile)) {
for (const d of diags) {
// Only keep diagnostics explicitly marked as Error (severity === 1)
@@ -1395,6 +1397,7 @@ export default function Share(props: {
part().toolInvocation.toolCallId
],
)
const hasError = metadata()?.error
const args = part().toolInvocation.args
const filePath = args.filePath
const diagnostics = createMemo(() =>
@@ -1429,13 +1432,27 @@ export default function Share(props: {
<span data-element-label>Edit</span>
<b>{filePath}</b>
</span>
<div data-part-tool-edit>
<DiffView
class={styles["diff-code-block"]}
diff={metadata()?.diff}
lang={getFileType(filePath)}
/>
</div>
<Switch>
<Match when={hasError}>
<div data-part-tool-result>
<TextPart
expand
data-size="sm"
data-color="dimmed"
text={metadata()?.message}
/>
</div>
</Match>
<Match when={false}>
<div data-part-tool-edit>
<DiffView
class={styles["diff-code-block"]}
diff={metadata()?.diff}
lang={getFileType(filePath)}
/>
</div>
</Match>
</Switch>
<Show when={diagnostics().length > 0}>
<TextPart
data-size="sm"
@@ -12,8 +12,11 @@
margin-bottom: 1rem;
}
ul,
ol {
list-style-position: inside;
padding-left: 0.75rem;
}
ul {
padding-left: 1.5rem;
}