cr
This commit is contained in:
@@ -80,21 +80,24 @@ export default function useInterruptedActions({
|
||||
}
|
||||
}, [interrupt]);
|
||||
|
||||
const resumeRun = (
|
||||
response: HumanResponse[],
|
||||
): boolean => {
|
||||
const resumeRun = (response: HumanResponse[]): boolean => {
|
||||
try {
|
||||
thread.submit({}, {
|
||||
thread.submit(
|
||||
{},
|
||||
{
|
||||
command: {
|
||||
resume: response,
|
||||
update: {
|
||||
messages: [{
|
||||
messages: [
|
||||
{
|
||||
type: "human",
|
||||
content: `Sending type '${response[0].type}' to interrupt...`
|
||||
}]
|
||||
}
|
||||
content: `Sending type '${response[0].type}' to interrupt...`,
|
||||
},
|
||||
})
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
return true;
|
||||
} catch (e: any) {
|
||||
console.error("Error sending human response", e);
|
||||
@@ -258,17 +261,22 @@ export default function useInterruptedActions({
|
||||
initialHumanInterruptEditValue.current = {};
|
||||
|
||||
try {
|
||||
thread.submit({}, {
|
||||
thread.submit(
|
||||
{},
|
||||
{
|
||||
command: {
|
||||
goto: END,
|
||||
update: {
|
||||
messages: [{
|
||||
messages: [
|
||||
{
|
||||
type: "human",
|
||||
content: "Marking thread as resolved."
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
content: "Marking thread as resolved.",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
toast("Success", {
|
||||
description: "Marked thread as resolved.",
|
||||
|
||||
@@ -80,7 +80,8 @@ export function AssistantMessage({
|
||||
const contentString = getContentString(message.content);
|
||||
|
||||
const thread = useStreamContext();
|
||||
const isLastMessage = thread.messages[thread.messages.length - 1].id === message.id;
|
||||
const isLastMessage =
|
||||
thread.messages[thread.messages.length - 1].id === message.id;
|
||||
const meta = thread.getMessagesMetadata(message);
|
||||
const interrupt = thread.interrupt;
|
||||
const parentCheckpoint = meta?.firstSeenState?.parent_checkpoint;
|
||||
|
||||
Reference in New Issue
Block a user