mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-08 17:59:09 +00:00
tweak: hide [REDACTED] chunks
This commit is contained in:
@@ -1101,7 +1101,11 @@ const PART_MAPPING = {
|
|||||||
function ReasoningPart(props: { last: boolean; part: ReasoningPart; message: AssistantMessage }) {
|
function ReasoningPart(props: { last: boolean; part: ReasoningPart; message: AssistantMessage }) {
|
||||||
const { theme, subtleSyntax } = useTheme()
|
const { theme, subtleSyntax } = useTheme()
|
||||||
const ctx = use()
|
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 (
|
return (
|
||||||
<Show when={content() && ctx.showThinking()}>
|
<Show when={content() && ctx.showThinking()}>
|
||||||
<box
|
<box
|
||||||
|
|||||||
Reference in New Issue
Block a user