功能:添加对响应文件大纲生成模式的支持 - #186
Conversation
- 引入 `normalizeOutlineMode` 和 `isResponseFileOutlineMode` 函数以处理新的大纲模式。 - 更新大纲生成任务以支持响应文件模式,包括上下文处理和消息格式化。 - 修改 `OutlineEditPage`,允许用户在对齐模式和响应文件模式之间选择大纲生成方式。 - 增强任务服务和技术计划存储以适应新的大纲模式。 - 更新 IPC 类型和接口以反映大纲模式处理的变化。 - 添加新的大纲生成配置截图作为参考。
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d6bdefc49
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| async function responseFileWorkflow(aiService, agentService, payload, log) { | ||
| log('开始提取响应文件要求中的技术文件目录。', OUTLINE_PROGRESS.requirementExtractionStart); | ||
| const groups = await extractResponseFileOutlineGroups(aiService, payload, undefined, log); |
There was a problem hiding this comment.
Recover when response-directory extraction fails
When the response-file mode's initial AI call still returns malformed group JSON after the normal repair attempts, this await rejects and the entire background task fails. The existing aligned workflow catches the equivalent extraction failure and invokes the Agent full-generation fallback, while the new response-file fallback only wraps the later child-directory generation. Add an extraction recovery path here so transient/model-format failures do not make this mode unusable.
Useful? React with 👍 / 👎.
| }; | ||
| const configurationRequiresRegeneration = Boolean(outlineData && !areWordControlOptionsEqual(normalizedDraftOptions, outlineWordControlSnapshot)); | ||
| const wordControlRequiresRegeneration = Boolean(outlineData && !areWordControlOptionsEqual(normalizedDraftOptions, outlineWordControlSnapshot)); | ||
| const outlineModeRequiresRegeneration = Boolean(outlineData && !isExpansionWorkflow && draftOutlineMode !== outlineMode); |
There was a problem hiding this comment.
Compare the mode against the generated-outline snapshot
With an existing aligned outline, selecting response-file and clicking “保存配置” persists that value as outlineMode without regenerating the outline. On the next dialog open, draftOutlineMode === outlineMode, so this warning disappears and the page reports the response-file mode even though the stored outline was generated by the old mode; the user can then continue with stale results. Track the mode used by the successful outline separately, or do not replace the effective mode until generation succeeds.
Useful? React with 👍 / 👎.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
agnet-analytics-api | 8d6bdef | Commit Preview URL Branch Preview URL |
Aug 04 2026, 08:10 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
agnet-analytics-dashboard | 8d6bdef | Commit Preview URL Branch Preview URL |
Aug 04 2026, 08:10 AM |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7a467e6b4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }); | ||
| trackConfigUsage({ | ||
| outline_mode: isExpansionWorkflow ? nextOutlineExpansionMode : 'aligned', | ||
| outline_mode: isExpansionWorkflow ? nextOutlineExpansionMode : nextOutlineMode, |
There was a problem hiding this comment.
Add a dashboard label for the new outline mode
When a user generates with this option, the client now reports outline_mode: "response-file", but the inspected Analytics Dashboard mapping in analytics/dashboard/public/src/pages/configUsage.js only labels free and aligned; its fallback therefore displays the raw English key instead of the Chinese mode name in the Step 03 statistics. Update the dashboard mapping alongside this new tracked value so the new mode remains clearly distinguishable in the product's analytics display.
AGENTS.md reference: AGENTS.md:L47-L53
Useful? React with 👍 / 👎.
normalizeOutlineMode和isResponseFileOutlineMode函数以处理新的大纲模式。OutlineEditPage,允许用户在对齐模式和响应文件模式之间选择大纲生成方式。