Feat/design agent simple #305

Merged
lhk229 merged 66 commits from feat/design_agent_simple into master 2026-09-09 16:34:50 +08:00
3 changed files with 23 additions and 14 deletions
Showing only changes of commit 1019403f40 - Show all commits
@@ -1467,19 +1467,21 @@ pub(crate) fn decide_planning_artifact_v2_at(
};
approval.receipt_fingerprint = approval_fingerprint(&approval)?;
write_approval_v2(root, &approval)?;
append_planning_message_v2(
root,
&PlanningMessageV2 {
schema_version: PLANNING_MESSAGE_V2_SCHEMA_VERSION.to_string(),
message_id: format!("msg-{}", Uuid::new_v4().simple()),
client_turn_id: input.decision_id.clone(),
turn_index: session.turn_index,
at_utc: approval.decided_at_utc.clone(),
role: "user".to_string(),
kind: "text".to_string(),
payload: serde_json::json!({"text": format!("审批:{} {}", input.action, comment.as_deref().unwrap_or_default()), "approvalAction": input.action, "artifactId": gdd.gdd_id, "version": gdd.version}),
},
)?;
if input.action != "revise" {
append_planning_message_v2(
root,
&PlanningMessageV2 {
schema_version: PLANNING_MESSAGE_V2_SCHEMA_VERSION.to_string(),
message_id: format!("msg-{}", Uuid::new_v4().simple()),
client_turn_id: input.decision_id.clone(),
turn_index: session.turn_index,
at_utc: approval.decided_at_utc.clone(),
role: "user".to_string(),
kind: "text".to_string(),
payload: serde_json::json!({"text": format!("审批:{} {}", input.action, comment.as_deref().unwrap_or_default()), "approvalAction": input.action, "artifactId": gdd.gdd_id, "version": gdd.version}),
},
)?;
}
update_index_v2(
root,
&gdd,
@@ -810,7 +810,7 @@ fn build_provider_request_v2(
let request = platform_llm::LlmRunRequest::new(messages)
.with_api_kind(api_kind)
.with_model(llm.model.clone())
.with_max_output_tokens(4_096)
.with_max_output_tokens(16_384)
.with_request_timeout_ms(llm.request_timeout_ms)
.with_function_tools(planning_v2_function_tools())
.with_tool_choice(platform_llm::LlmToolChoice::Auto);
+7
View File
@@ -831,6 +831,13 @@ export function App({
replayed: approval.replayed,
});
setPlanGddError(null);
if (action === 'revise' && comment?.trim()) {
await executePlanningV2Turn(
targetProjectPath,
`审批:revise ${comment.trim()}`,
`planning-v2-revision-${crypto.randomUUID()}`,
);
}
return;
}
await invokeDiagnostic(invoke, 'decide_game_creator_plan_gdd', {