Repair repo face swarm speech
This commit is contained in:
parent
22fe2eeb30
commit
af74530d2e
8 changed files with 93 additions and 11 deletions
|
|
@ -4594,7 +4594,10 @@ function buildChannelPlan(
|
|||
const preferred = preferredChannelId
|
||||
? options.find((option) => option.channelId === preferredChannelId)
|
||||
: undefined;
|
||||
const primary = preferred ?? options
|
||||
const defaultOption = defaultChannelId
|
||||
? options.find((option) => option.channelId === defaultChannelId)
|
||||
: undefined;
|
||||
const primary = preferred ?? defaultOption ?? options
|
||||
.slice()
|
||||
.sort((left, right) => thresholdRank(left.speechThreshold) - thresholdRank(right.speechThreshold))
|
||||
[0];
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ async function main() {
|
|||
},
|
||||
);
|
||||
|
||||
const memoryMaintenance = runSleepMemoryMaintenanceIfDue({ sleepCycle });
|
||||
const memoryMaintenance = runSleepMemoryMaintenanceIfDue({ sleepCycle, typedState });
|
||||
if (memoryMaintenance.status === "failed") {
|
||||
writeStatus({
|
||||
status: "failed",
|
||||
|
|
@ -226,7 +226,7 @@ function readJsonSafe(path) {
|
|||
}
|
||||
}
|
||||
|
||||
function runSleepMemoryMaintenanceIfDue({ sleepCycle }) {
|
||||
function runSleepMemoryMaintenanceIfDue({ sleepCycle, typedState }) {
|
||||
if (args.has("--skip-memory-maintenance")) {
|
||||
return {
|
||||
status: "skipped",
|
||||
|
|
@ -256,6 +256,16 @@ function runSleepMemoryMaintenanceIfDue({ sleepCycle }) {
|
|||
};
|
||||
}
|
||||
|
||||
const shortTermPressure = (typedState.thoughtMemory?.shortTerm ?? [])
|
||||
.filter((memory) => typeof memory?.retiredAt !== "string" || memory.retiredAt.trim().length === 0)
|
||||
.length;
|
||||
if (!args.has("--force-memory-maintenance") && shortTermPressure === 0) {
|
||||
return {
|
||||
status: "skipped",
|
||||
reason: "no_short_term_memory_pressure",
|
||||
};
|
||||
}
|
||||
|
||||
const result = spawnSync(
|
||||
"powershell",
|
||||
[
|
||||
|
|
|
|||
Loading…
Reference in a new issue