GeezerVison is showing github.com — chore: generate · mathstuf/opencode@4194d55
File treeExpand file treeCollapse file tree Open diff view settings .opencode/skills/opencode-drive performance/timeline-stability
feature-plugins/system/storybook
ast-grep/rule-tests/__snapshots__
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .opencode/skills/opencode-drive/SKILL.md -1Lines changed: 0 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -251,4 +251,3 @@ opencode-drive stop --name demo | 251 | 251 | ```bash | 252 | 252 | opencode-drive dir --name demo | 253 | 253 | ``` | 254 | | - |
Collapse file Copy file name to clipboardExpand all lines: packages/ai/src/cache-policy.ts +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -133,7 +133,8 @@ const countHints = (request: LLMRequest) => | 133 | 133 |
| 134 | 134 | export const applyCachePolicy = (request: LLMRequest): LLMRequest => { | 135 | 135 | if (!RESPECTS_INLINE_HINTS.has(request.model.route.id)) return request | 136 | | - if (request.model.route.id === "openrouter" && (request.cache === undefined || request.cache === "auto")) return request | | 136 | + if (request.model.route.id === "openrouter" && (request.cache === undefined || request.cache === "auto")) | | 137 | + return request | 137 | 138 | const policy = resolve(request.cache) | 138 | 139 | if (!policy.tools && !policy.system && !policy.messages) return request | 139 | 140 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/ai/src/protocols/openai-chat.ts +2-5Lines changed: 2 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -709,9 +709,7 @@ const step = (state: ParserState, event: OpenAIChatEvent) => | 709 | 709 | Boolean(delta?.content) || | 710 | 710 | reasoning !== undefined || | 711 | 711 | (Array.isArray(delta?.reasoning_details) && delta.reasoning_details.length > 0) || | 712 | | - toolDeltas.some( | 713 | | - (tool) => Boolean(tool.id) || Boolean(tool.function?.name) || Boolean(tool.function?.arguments), | 714 | | - ) | | 712 | + toolDeltas.some((tool) => Boolean(tool.id) || Boolean(tool.function?.name) || Boolean(tool.function?.arguments)) | 715 | 713 | if (state.finishReason !== undefined) { | 716 | 714 | if (hasLateContent) | 717 | 715 | return yield* ProviderShared.eventError(ADAPTER, "OpenAI Chat received content after the finish reason") | @@ -751,8 +749,7 @@ const step = (state: ParserState, event: OpenAIChatEvent) => | 751 | 749 | const fallback = toolDeltas.length > 1 ? position : (latestToolIndex ?? position) | 752 | 750 | const fallbackTool = tools[fallback] ?? pendingTools[fallback] | 753 | 751 | const index = | 754 | | - tool.index ?? matched ?? | 755 | | - (tool.id && fallbackTool?.id && fallbackTool.id !== tool.id ? nextToolIndex : fallback) | | 752 | + tool.index ?? matched ?? (tool.id && fallbackTool?.id && fallbackTool.id !== tool.id ? nextToolIndex : fallback) | 756 | 753 | const current = tools[index] | 757 | 754 | const pending = pendingTools[index] | 758 | 755 | const id = current?.id ?? pending?.id ?? (tool.id || undefined) | |
Collapse file Copy file name to clipboardExpand all lines: packages/ai/src/route/client.ts +1-7Lines changed: 1 addition & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -255,13 +255,7 @@ const requireTerminalEvent = (route: string) => (events: Stream.Stream<LLMEvent, | 255 | 255 | if (LLMEvent.is.finish(event) || LLMEvent.is.providerError(event)) terminal = true | 256 | 256 | return Effect.succeed(event) | 257 | 257 | }), | 258 | | - Stream.onEnd( | 259 | | - Effect.suspend(() => | 260 | | - terminal | 261 | | - ? Effect.void | 262 | | - : Effect.fail(incompleteStreamError(route)), | 263 | | - ), | 264 | | - ), | | 258 | + Stream.onEnd(Effect.suspend(() => (terminal ? Effect.void : Effect.fail(incompleteStreamError(route))))), | 265 | 259 | ) | 266 | 260 | }) | 267 | 261 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/ai/src/tool.ts +2-7Lines changed: 2 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | import { Effect, JsonSchema, Schema } from "effect" | 2 | 2 | import { Tool } from "@opencode-ai/schema/tool" | 3 | | -import type { | 4 | | - ToolCallPart, | 5 | | - ToolDefinition as ToolDefinitionClass, | 6 | | - ToolOutput as ToolOutputType, | 7 | | -} from "./schema" | | 3 | +import type { ToolCallPart, ToolDefinition as ToolDefinitionClass, ToolOutput as ToolOutputType } from "./schema" | 8 | 4 | import { ToolDefinition, ToolFailure, ToolOutput } from "./schema" | 9 | 5 |
| 10 | 6 | /** | @@ -244,8 +240,7 @@ const project = ( | 244 | 240 | ): ToolOutputType => | 245 | 241 | ToolOutput.make( | 246 | 242 | toStructuredOutput?.(output) ?? output, | 247 | | - toModelOutput?.({ id, parameters, output }) ?? | 248 | | - (typeof output === "string" ? [{ type: "text", text: output }] : []), | | 243 | + toModelOutput?.({ id, parameters, output }) ?? (typeof output === "string" ? [{ type: "text", text: output }] : []), | 249 | 244 | ) | 250 | 245 |
| 251 | 246 | export { ToolFailure } | |
Collapse file Copy file name to clipboardExpand all lines: packages/ai/test/fixtures/recordings/anthropic-messages-cache/keeps-a-long-tool-turn-inside-the-cache-lookback.json +1-7Lines changed: 1 addition & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "version": 1, | 3 | 3 | "metadata": { | 4 | | - "tags": [ | 5 | | - "prefix:anthropic-messages-cache", | 6 | | - "provider:anthropic", | 7 | | - "protocol:anthropic-messages", | 8 | | - "cache", | 9 | | - "tool" | 10 | | - ], | | 4 | + "tags": ["prefix:anthropic-messages-cache", "provider:anthropic", "protocol:anthropic-messages", "cache", "tool"], | 11 | 5 | "name": "anthropic-messages-cache/keeps-a-long-tool-turn-inside-the-cache-lookback", | 12 | 6 | "recordedAt": "2026-07-24T16:22:29.494Z" | 13 | 7 | }, | |
Collapse file Copy file name to clipboardExpand all lines: packages/ai/test/fixtures/recordings/bedrock-converse-cache/writes-then-reads-cachepoint-on-identical-second-call.json +1-6Lines changed: 1 addition & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "version": 1, | 3 | 3 | "metadata": { | 4 | | - "tags": [ | 5 | | - "prefix:bedrock-converse-cache", | 6 | | - "provider:amazon-bedrock", | 7 | | - "protocol:bedrock-converse", | 8 | | - "cache" | 9 | | - ], | | 4 | + "tags": ["prefix:bedrock-converse-cache", "provider:amazon-bedrock", "protocol:bedrock-converse", "cache"], | 10 | 5 | "name": "bedrock-converse-cache/writes-then-reads-cachepoint-on-identical-second-call", | 11 | 6 | "recordedAt": "2026-07-23T02:29:10.955Z" | 12 | 7 | }, | |
Collapse file Copy file name to clipboardExpand all lines: packages/ai/test/fixtures/recordings/google-images/generates-an-image.json +1-5Lines changed: 1 addition & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "version": 1, | 3 | 3 | "metadata": { | 4 | | - "tags": [ | 5 | | - "prefix:google-images", | 6 | | - "provider:google", | 7 | | - "protocol:google-images" | 8 | | - ], | | 4 | + "tags": ["prefix:google-images", "provider:google", "protocol:google-images"], | 9 | 5 | "name": "google-images/generates-an-image", | 10 | 6 | "recordedAt": "2026-07-19T16:05:51.868Z" | 11 | 7 | }, | |
Collapse file Copy file name to clipboardExpand all lines: packages/ai/test/fixtures/recordings/openai-images/generates-an-image.json +1-5Lines changed: 1 addition & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "version": 1, | 3 | 3 | "metadata": { | 4 | | - "tags": [ | 5 | | - "prefix:openai-images", | 6 | | - "provider:openai", | 7 | | - "protocol:openai-images" | 8 | | - ], | | 4 | + "tags": ["prefix:openai-images", "provider:openai", "protocol:openai-images"], | 9 | 5 | "name": "openai-images/generates-an-image", | 10 | 6 | "recordedAt": "2026-07-19T14:41:43.188Z" | 11 | 7 | }, | |
Collapse file Copy file name to clipboardExpand all lines: packages/ai/test/fixtures/recordings/openai-responses-images/generates-and-edits-an-image-with-the-hosted-tool.json +1-5Lines changed: 1 addition & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "version": 1, | 3 | 3 | "metadata": { | 4 | | - "tags": [ | 5 | | - "prefix:openai-responses-images", | 6 | | - "provider:openai", | 7 | | - "protocol:openai-responses" | 8 | | - ], | | 4 | + "tags": ["prefix:openai-responses-images", "provider:openai", "protocol:openai-responses"], | 9 | 5 | "name": "openai-responses-images/generates-and-edits-an-image-with-the-hosted-tool", | 10 | 6 | "recordedAt": "2026-07-19T14:57:16.284Z" | 11 | 7 | }, | |
|