Compare commits

...

9 Commits

Author SHA1 Message Date
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
Dax Raad
41c54f629c sync 2025-06-12 12:48:38 -04:00
Dax Raad
4503201b15 npm token 2025-06-12 12:09:13 -04:00
Dax Raad
120151ee38 sync 2025-06-12 11:58:41 -04:00
Dax Raad
4d2e556713 sync 2025-06-12 11:57:57 -04:00
Dax Raad
54a5d3a9eb sync 2025-06-12 11:56:52 -04:00
5 changed files with 41 additions and 15 deletions

View File

@@ -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
@@ -24,7 +24,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: ">=1.23.2"
go-version: ">=1.24.0"
cache: true
cache-dependency-path: go.sum
@@ -32,8 +32,11 @@ jobs:
with:
bun-version: 1.2.16
- run: ./script/publish.ts
dir: packages/opencode
- run: |
bun install
./script/publish.ts
working-directory: ./packages/opencode
env:
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

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

View File

@@ -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))
}

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"

View File

@@ -12,8 +12,11 @@
margin-bottom: 1rem;
}
ul,
ol {
list-style-position: inside;
padding-left: 0.75rem;
}
ul {
padding-left: 1.5rem;
}