Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
// Module ID: 16633
|
|
// Function ID: 16634
|
|
// Name: vibegrationsPendingPlan
|
|
// Dependencies: [12852, 2]
|
|
// Exports: pendingPlanRenderId
|
|
|
|
// Module 16633 (vibegrationsPendingPlan)
|
|
import VibegrationsChatStore from "VibegrationsChatStore" /* 12852 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const turnSettled = VibegrationsChatStore.turnSettled;
|
|
const result = size.fileFinishedImporting("modules/vibegrations/lib/vibegrationsPendingPlan.tsx");
|
|
|
|
export const pendingPlanRenderId = function pendingPlanRenderId(memo) {
|
|
const atResult = memo.at(-1);
|
|
let role;
|
|
if (atResult != null) {
|
|
role = atResult.role;
|
|
}
|
|
if ("assistant" !== role) {
|
|
return null;
|
|
} else {
|
|
let diff = memo.length - 1;
|
|
if (0 <= diff) {
|
|
while (true) {
|
|
let tmp4 = memo[diff];
|
|
if ("assistant" === tmp4.role) {
|
|
if (!turnSettled(tmp4)) {
|
|
break;
|
|
} else if ("plan_implemented" === tmp4.kind) {
|
|
break;
|
|
} else if (null != tmp4.proposal) {
|
|
return tmp4.render_id;
|
|
}
|
|
}
|
|
diff = diff - 1;
|
|
}
|
|
return null;
|
|
}
|
|
return null;
|
|
}
|
|
};
|