mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tweak: hide [REDACTED] chunks
This commit is contained in:
parent
46dd3b8166
commit
d9b0848a61
1 changed files with 5 additions and 1 deletions
|
|
@ -1101,7 +1101,11 @@ const PART_MAPPING = {
|
|||
function ReasoningPart(props: { last: boolean; part: ReasoningPart; message: AssistantMessage }) {
|
||||
const { theme, subtleSyntax } = useTheme()
|
||||
const ctx = use()
|
||||
const content = createMemo(() => props.part.text.trim())
|
||||
const content = createMemo(() => {
|
||||
// Filter out redacted reasoning chunks from OpenRouter
|
||||
// OpenRouter sends encrypted reasoning data that appears as [REDACTED]
|
||||
return props.part.text.replace("[REDACTED]", "").trim()
|
||||
})
|
||||
return (
|
||||
<Show when={content() && ctx.showThinking()}>
|
||||
<box
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue