Function
pick
(value: string | undefined)
Source from the content-addressed store, hash-verified
| 29 | type ModelInput = Parameters<OpencodeClient["session"]["prompt"]>[0]["model"] |
| 30 | |
| 31 | function pick(value: string | undefined): ModelInput | undefined { |
| 32 | if (!value) return undefined |
| 33 | const [providerID, ...rest] = value.split("/") |
| 34 | return { |
| 35 | providerID, |
| 36 | modelID: rest.join("/"), |
| 37 | } as ModelInput |
| 38 | } |
| 39 | |
| 40 | function resolveRunInput(value?: string, piped?: string): string | undefined { |
| 41 | if (!value) { |
Tested by
no test coverage detected