Files
twenty/packages/twenty-front/src/modules/ai/utils/isThinkingStepPart.ts
T
nitin 223943550c [AI] Unify code-interpreter streaming rendering and fix assistant width jitter (#19235)
closes
https://discord.com/channels/1130383047699738754/1480991390782455838

- Use data-code-execution as the streaming source of truth and hide
duplicate code-interpreter tool parts (including tool-execute_tool
wrappers).
- Ensure wrapped execute_tool code-interpreter outputs still render
correctly after refetch.
- Gate code-interpreter server behavior by enablement state and keep
assistant messages full-width to avoid streaming vs completed width
shifts.

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2026-04-02 10:58:14 +00:00

16 lines
476 B
TypeScript

import { isToolUIPart } from 'ai';
import { type ExtendedUIMessagePart } from 'twenty-shared/ai';
import { isCodeInterpreterToolPart } from '@/ai/utils/isCodeInterpreterToolPart';
import { type ThinkingStepPart } from '@/ai/utils/thinkingStepPart';
export const isThinkingStepPart = (
part: ExtendedUIMessagePart,
): part is ThinkingStepPart => {
if (part.type === 'reasoning') {
return true;
}
return isToolUIPart(part) && !isCodeInterpreterToolPart(part);
};