feat(app): hide reasoning once agent is done
This commit is contained in:
parent
1e74560796
commit
52e4dd110b
1 changed files with 8 additions and 1 deletions
|
|
@ -78,6 +78,7 @@ function AssistantMessageItem(props: {
|
||||||
message: AssistantMessage
|
message: AssistantMessage
|
||||||
responsePartId: string | undefined
|
responsePartId: string | undefined
|
||||||
hideResponsePart: boolean
|
hideResponsePart: boolean
|
||||||
|
hideReasoning: boolean
|
||||||
}) {
|
}) {
|
||||||
const data = useData()
|
const data = useData()
|
||||||
const emptyParts: PartType[] = []
|
const emptyParts: PartType[] = []
|
||||||
|
|
@ -92,7 +93,12 @@ function AssistantMessageItem(props: {
|
||||||
})
|
})
|
||||||
|
|
||||||
const filteredParts = createMemo(() => {
|
const filteredParts = createMemo(() => {
|
||||||
const parts = msgParts()
|
let parts = msgParts()
|
||||||
|
|
||||||
|
if (props.hideReasoning) {
|
||||||
|
parts = parts.filter((part) => part?.type !== "reasoning")
|
||||||
|
}
|
||||||
|
|
||||||
if (!props.hideResponsePart) return parts
|
if (!props.hideResponsePart) return parts
|
||||||
|
|
||||||
const responsePartId = props.responsePartId
|
const responsePartId = props.responsePartId
|
||||||
|
|
@ -556,6 +562,7 @@ export function SessionTurn(
|
||||||
message={assistantMessage}
|
message={assistantMessage}
|
||||||
responsePartId={responsePartId()}
|
responsePartId={responsePartId()}
|
||||||
hideResponsePart={hideResponsePart()}
|
hideResponsePart={hideResponsePart()}
|
||||||
|
hideReasoning={!working()}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue