This commit is contained in:
+15
-1
@@ -94,6 +94,7 @@ import {
|
||||
createStreamingAssistantMetadata,
|
||||
createStreamingAttemptState,
|
||||
finalizeStreamingAssistant,
|
||||
markStreamingAssistantAsAgentAside,
|
||||
promoteStreamingAssistantTrace,
|
||||
setStreamingAssistantSegment,
|
||||
transitionStreamingToolCall,
|
||||
@@ -2628,6 +2629,7 @@ export default function App() {
|
||||
...baseChat.messages
|
||||
.filter((message) => !isToolCallLogMessage(message))
|
||||
.map((message) => ({
|
||||
id: message.id,
|
||||
role: message.role,
|
||||
content: message.content,
|
||||
...(message.name ? { name: message.name } : {}),
|
||||
@@ -2640,7 +2642,7 @@ export default function App() {
|
||||
},
|
||||
];
|
||||
|
||||
if (shouldRequestChatTitle(baseChat, pendingTitleGenerationRef.current.has(chatId))) {
|
||||
if (shouldRequestChatTitle(baseChat, pendingTitleGenerationRef.current.has(chatId)) && !content.toLowerCase().includes("@sybil")) {
|
||||
pendingTitleGenerationRef.current.add(chatId);
|
||||
const titleSeed = content || buildAttachmentSummary(attachments) || "Uploaded files";
|
||||
void suggestChatTitle({ chatId, content: titleSeed })
|
||||
@@ -2676,6 +2678,18 @@ export default function App() {
|
||||
{
|
||||
onMeta: (payload) => {
|
||||
if (payload.chatId !== chatId) return;
|
||||
if (payload.agentAside) {
|
||||
setPendingChatStates((current) => {
|
||||
const pendingState = current[chatId];
|
||||
if (!pendingState) return current;
|
||||
return {
|
||||
...current,
|
||||
[chatId]: {
|
||||
messages: markStreamingAssistantAsAgentAside(pendingState.messages, "temp-assistant-"),
|
||||
},
|
||||
};
|
||||
});
|
||||
}
|
||||
},
|
||||
onToolCall: (payload) => {
|
||||
const transition = transitionStreamingToolCall(streamingAttempt, payload);
|
||||
|
||||
Reference in New Issue
Block a user