You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
? `The workspace environment (all files, packages, and code changes) has been fully restored from where you left off.`
895
913
: `The workspace files from the previous session were not restored (the file snapshot may have expired), so you are starting with a fresh environment. Your conversation history is fully preserved below.`;
896
914
897
-
letresumePrompt: string;
898
-
if(pendingUserMessage){
899
-
// Include the pending message as the user's new question so the agent
900
-
// responds to it directly instead of the generic resume context.
901
-
resumePrompt=
902
-
`You are resuming a previous conversation. ${sandboxContext}\n\n`+
903
-
`Here is the conversation history from the previous session:\n\n`+
904
-
`${conversationSummary}\n\n`+
905
-
`The user has sent a new message:\n\n`+
906
-
`${pendingUserMessage}\n\n`+
907
-
`Respond to the user's new message above. You have full context from the previous session.`;
915
+
letresumePromptBlocks: ContentBlock[];
916
+
if(pendingUserPrompt?.length){
917
+
resumePromptBlocks=[
918
+
{
919
+
type: "text",
920
+
text:
921
+
`You are resuming a previous conversation. ${sandboxContext}\n\n`+
922
+
`Here is the conversation history from the previous session:\n\n`+
923
+
`${conversationSummary}\n\n`+
924
+
`The user has sent a new message:\n\n`,
925
+
},
926
+
...pendingUserPrompt,
927
+
{
928
+
type: "text",
929
+
text: "\n\nRespond to the user's new message above. You have full context from the previous session.",
930
+
},
931
+
];
908
932
}else{
909
-
resumePrompt=
910
-
`You are resuming a previous conversation. ${sandboxContext}\n\n`+
911
-
`Here is the conversation history from the previous session:\n\n`+
912
-
`${conversationSummary}\n\n`+
913
-
`Continue from where you left off. The user is waiting for your response.`;
933
+
resumePromptBlocks=[
934
+
{
935
+
type: "text",
936
+
text:
937
+
`You are resuming a previous conversation. ${sandboxContext}\n\n`+
938
+
`Here is the conversation history from the previous session:\n\n`+
939
+
`${conversationSummary}\n\n`+
940
+
`Continue from where you left off. The user is waiting for your response.`,
'__twig_cloud_prompt_v1__:{"blocks":[{"type":"text","text":"read this attachment"},{"type":"resource","resource":{"uri":"attachment://test.txt","text":"hello from file","mimeType":"text/plain"}}]}',
0 commit comments