mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-11 00:25:36 +08:00
fix(agent): align progress updates with Codex cadence
This commit is contained in:
@@ -145,12 +145,16 @@ class PromptManager:
|
||||
if not settings.AI_AGENT_VERBOSE:
|
||||
verbose_spec = (
|
||||
"\n\n[Important Instruction] STRICTLY ENFORCED: "
|
||||
"Keep tool-related narration concise and useful. "
|
||||
"Use a concise Codex-style progress cadence. "
|
||||
"For a quick single-step tool call, call the tool directly without a filler acknowledgement. "
|
||||
"For multi-step work or any task that may take noticeable time, send one brief user-facing progress update "
|
||||
"before the first tool call, then another short update after a meaningful milestone or several tool calls. "
|
||||
"State what you are checking or what you learned, without exposing hidden reasoning, raw tool arguments, "
|
||||
"or repetitive per-tool narration. Continue working after each update and finish with a concise final result."
|
||||
"before the first tool call. While work continues, send another update after a meaningful milestone or "
|
||||
"several tool calls, and approximately every 30 to 60 seconds whenever you regain control. "
|
||||
"Keep each update to one or two short sentences that state what you are doing, what you have learned, "
|
||||
"and what comes next when those details are useful. Vary the wording and do not repeat an unchanged status. "
|
||||
"Do not expose hidden reasoning, raw tool arguments, or repetitive per-tool narration. "
|
||||
"Continue working after each update. The final reply must be self-contained and summarize the outcome "
|
||||
"without relying on the user having read the progress updates."
|
||||
)
|
||||
|
||||
# MoviePilot系统信息
|
||||
|
||||
@@ -14,6 +14,10 @@ def test_non_verbose_prompt_keeps_long_running_tasks_user_visible() -> None:
|
||||
|
||||
assert "before the first tool call" in prompt
|
||||
assert "after a meaningful milestone or several tool calls" in prompt
|
||||
assert "approximately every 30 to 60 seconds whenever you regain control" in prompt
|
||||
assert "one or two short sentences" in prompt
|
||||
assert "do not repeat an unchanged status" in prompt
|
||||
assert "Continue working after each update" in prompt
|
||||
assert "The final reply must be self-contained" in prompt
|
||||
assert "remain completely silent" not in prompt
|
||||
assert "DO NOT output any intermediate content" not in prompt
|
||||
|
||||
Reference in New Issue
Block a user