pi-ext
bugabingas pi extensions
owned by bugabinga
fix(the-system): queue returned task result
51a4418be5f226c0a5369a9b5951e22b9f7558eb
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (2)
extensions/the-system/__tests__/the-system.test.ts
Modified 851 851 appendAssistantMessage,
852 852 assertBranchHistory,
854 + getLastSendMessageOptions,
889 890 notification(
"Task finished. Last response attached."),
891 892 assert.
ok(
isLlmTriggered());
893 + assert.
deepStrictEqual(
getLastSendMessageOptions(), {
895 + deliverAs:
"followUp",
894 899 it(
"returns the branch result to the original leaf for branch-context tasks",
async ()
=> {
1194 1199 const sessionShutdownHandlers
: Array<()
=> unknown>
= [];
1195 1200 const triggeredCustomMessages
= new Set<
string>();
1196 1201 const triggeredUserMessages
= new Set<
string>();
1202 + let lastSendMessageOptions
: 1203 + | { triggerTurn
?: boolean; deliverAs
?: "steer" | "followUp" | "nextTurn" }
1198 1206 const trackedHints
: Array<{ text
: string; afterEntryId
: string | null }>
= [];
1199 1207 let cancelNextNav
= false;
1225 1233 display
?: boolean;
1226 1234 details
?: unknown;
1228 - options
?: { triggerTurn?: boolean },
1237 + triggerTurn?: boolean;
1238 + deliverAs
?: "steer" | "followUp" | "nextTurn";
1241 + lastSendMessageOptions
= options;
1230 1242 sm.
appendCustomMessageEntry(
1231 1243 message.customType,
1232 1244 message.
content as string,
1492 1504 return taskStatus;
1507 + function getLastSendMessageOptions() {
1508 + return lastSendMessageOptions;
1496 1512 assertBranchHistory,
1497 1513 isLlmTriggered,
1514 + getLastSendMessageOptions,
1499 1516 appendUserMessage,
1500 1517 appendAssistantMessage,
extensions/the-system/index.ts
Modified371 371 details: {
sourceEntryId: lastAssistantId, slug },
373 - {
triggerTurn:
true },
373 + {
triggerTurn:
true,
deliverAs:
"followUp" },