Compare commits

..
5 Commits
Author SHA1 Message Date
Dax Raad ee1f55dbe2 token
publish / publish (push) Has been cancelled
2025-06-12 13:17:06 -04:00
Dax Raad 2fa50190e5 skip nil values
publish / publish (push) Has been cancelled
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
publish / publish (push) Has been cancelled
2025-06-12 13:04:01 -04:00
Dax Raad 41c54f629c sync
release / goreleaser (push) Has been cancelled
2025-06-12 12:48:38 -04:00
5 changed files with 35 additions and 12 deletions
@@ -1,4 +1,4 @@
name: release name: publish
on: on:
workflow_dispatch: workflow_dispatch:
@@ -13,7 +13,7 @@ permissions:
packages: write packages: write
jobs: jobs:
goreleaser: publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
+2 -2
View File
@@ -58,7 +58,7 @@ for (const [os, arch] of targets) {
), ),
) )
if (!dry) 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 optionalDependencies[name] = version
} }
@@ -83,7 +83,7 @@ await Bun.file(`./dist/${pkg.name}/package.json`).write(
), ),
) )
if (!dry) 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) { if (!snapshot) {
// Github Release // Github Release
@@ -484,6 +484,9 @@ func renderArgs(args *map[string]any, titleKey string) string {
title := "" title := ""
parts := []string{} parts := []string{}
for key, value := range *args { for key, value := range *args {
if value == nil {
continue
}
if key == "filePath" || key == "path" { if key == "filePath" || key == "path" {
value = relative(value.(string)) value = relative(value.(string))
} }
+24 -7
View File
@@ -167,6 +167,8 @@ export function getDiagnostics(
): string[] { ): string[] {
const result: string[] = [] const result: string[] = []
if (diagnosticsByFile === undefined) return result
for (const diags of Object.values(diagnosticsByFile)) { for (const diags of Object.values(diagnosticsByFile)) {
for (const d of diags) { for (const d of diags) {
// Only keep diagnostics explicitly marked as Error (severity === 1) // Only keep diagnostics explicitly marked as Error (severity === 1)
@@ -1395,6 +1397,7 @@ export default function Share(props: {
part().toolInvocation.toolCallId part().toolInvocation.toolCallId
], ],
) )
const hasError = metadata()?.error
const args = part().toolInvocation.args const args = part().toolInvocation.args
const filePath = args.filePath const filePath = args.filePath
const diagnostics = createMemo(() => const diagnostics = createMemo(() =>
@@ -1429,13 +1432,27 @@ export default function Share(props: {
<span data-element-label>Edit</span> <span data-element-label>Edit</span>
<b>{filePath}</b> <b>{filePath}</b>
</span> </span>
<div data-part-tool-edit> <Switch>
<DiffView <Match when={hasError}>
class={styles["diff-code-block"]} <div data-part-tool-result>
diff={metadata()?.diff} <TextPart
lang={getFileType(filePath)} expand
/> data-size="sm"
</div> 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}> <Show when={diagnostics().length > 0}>
<TextPart <TextPart
data-size="sm" data-size="sm"
@@ -12,8 +12,11 @@
margin-bottom: 1rem; margin-bottom: 1rem;
} }
ul,
ol { ol {
list-style-position: inside;
padding-left: 0.75rem;
}
ul {
padding-left: 1.5rem; padding-left: 1.5rem;
} }