fix: 修复部分情况下goal无法启动的问题
This commit is contained in:
parent
241bd48129
commit
bffb80e110
|
|
@ -23,6 +23,7 @@ import {
|
||||||
formatGoalElapsed,
|
formatGoalElapsed,
|
||||||
formatGoalStatusLabel,
|
formatGoalStatusLabel,
|
||||||
getGoal,
|
getGoal,
|
||||||
|
incrementGoalTurns,
|
||||||
pauseGoal,
|
pauseGoal,
|
||||||
resumeGoal,
|
resumeGoal,
|
||||||
setGoal,
|
setGoal,
|
||||||
|
|
@ -49,6 +50,7 @@ function formatGoalStatus(): string {
|
||||||
|
|
||||||
function applySetGoal(objective: string): string {
|
function applySetGoal(objective: string): string {
|
||||||
setGoal(objective);
|
setGoal(objective);
|
||||||
|
incrementGoalTurns();
|
||||||
persistCurrentGoal();
|
persistCurrentGoal();
|
||||||
return `Goal set: ${objective}\n\n${formatGoalStatus()}`;
|
return `Goal set: ${objective}\n\n${formatGoalStatus()}`;
|
||||||
}
|
}
|
||||||
|
|
@ -118,6 +120,7 @@ export async function call(
|
||||||
const summary = applySetGoal(trimmed);
|
const summary = applySetGoal(trimmed);
|
||||||
onDone(summary, {
|
onDone(summary, {
|
||||||
display: 'system',
|
display: 'system',
|
||||||
|
shouldQuery: true,
|
||||||
metaMessages: [`<goal-objective-updated>\n${trimmed}\n</goal-objective-updated>`],
|
metaMessages: [`<goal-objective-updated>\n${trimmed}\n</goal-objective-updated>`],
|
||||||
});
|
});
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -131,6 +134,7 @@ export async function call(
|
||||||
const summary = applySetGoal(trimmed);
|
const summary = applySetGoal(trimmed);
|
||||||
onDone(summary, {
|
onDone(summary, {
|
||||||
display: 'system',
|
display: 'system',
|
||||||
|
shouldQuery: true,
|
||||||
metaMessages: [`<goal-objective-updated>\n${trimmed}\n</goal-objective-updated>`],
|
metaMessages: [`<goal-objective-updated>\n${trimmed}\n</goal-objective-updated>`],
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user