diff options
| author | Adam <[email protected]> | 2025-11-27 05:05:55 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-11-27 05:05:55 -0600 |
| commit | 50fd416d49c86451462e8d49c9fea1b3f5584d93 (patch) | |
| tree | abf925b08540dd8545adfa98aca20ae7e4d7670a /packages/util/src | |
| parent | aef69042479ba66446f0c8f5e60b5cb76d54bfc4 (diff) | |
| download | opencode-50fd416d49c86451462e8d49c9fea1b3f5584d93.tar.gz opencode-50fd416d49c86451462e8d49c9fea1b3f5584d93.zip | |
fix: simpler sanitize
Diffstat (limited to 'packages/util/src')
| -rw-r--r-- | packages/util/src/sanitize.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/util/src/sanitize.ts b/packages/util/src/sanitize.ts index 270b618ae..38ad2b290 100644 --- a/packages/util/src/sanitize.ts +++ b/packages/util/src/sanitize.ts @@ -2,7 +2,7 @@ import type { Part } from "@opencode-ai/sdk/client" export const sanitize = (text: string | undefined, remove?: RegExp) => (remove ? text?.replace(remove, "") : text) ?? "" -export const sanitizePart = (part: Part, remove: RegExp) => { +export const sanitizePart = (part: Part, remove: RegExp | undefined) => { if (part.type === "text") { part.text = sanitize(part.text, remove) } else if (part.type === "reasoning") { |
