-
Notifications
You must be signed in to change notification settings - Fork 44
feat: support for add-page and remove-page #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis pull request implements comprehensive page management functionality for a website structure system. The changes add capabilities for adding new pages with automatic link integration, removing pages with proper cleanup of invalid links, and recursive deletion of page hierarchies. The implementation includes interactive user interfaces, validation systems, and proper error handling for most operations, though some critical issues exist with process termination and error handling patterns. Changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (8)
- agents/clear/clear-generated-pages.mjs (1)
- agents/plan/user-add-page/add-links-to-pages.mjs (1)
- agents/plan/user-add-page/add-pages-to-structure.mjs (1)
- agents/plan/user-remove-page/find-pages-with-invalid-links.mjs (1)
- agents/plan/user-remove-page/remove-invalid-links-from-page.mjs (1)
- agents/plan/user-remove-page/remove-pages-from-structure.mjs (1)
- agents/plan/website-structure-tools/delete-page.mjs (3)
- types/website-structure-schema.mjs (2)
Files ignored due to filter (5)
- agents/plan/user-add-page/find-pages-to-add-links.yaml
- agents/plan/user-add-page/index.yaml
- agents/plan/user-remove-page/index.yaml
- aigne.yaml
- prompts/plan/find-pages-to-add-links.md
Review comments generated (14)
- Review: 7
- LGTM: 7
agents/plan/user-remove-page/remove-invalid-links-from-page.mjs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for adding and removing pages from the website structure through new CLI commands add-page and remove-page. The implementation includes recursive page deletion, automatic link management, and proper translation handling for modified pages.
Key Changes:
- Added
add-pageandremove-pageCLI commands with corresponding agent workflows - Implemented recursive page deletion to handle parent-child page relationships
- Added automatic detection and cleanup of invalid internal links after page removal
- Centralized YAML stringification options to ensure consistent formatting
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
aigne.yaml |
Registers new add-page and remove-page CLI commands and agent configurations |
types/website-structure-schema.mjs |
Adds optional recursive parameter to delete page schema for cascading deletions |
agents/plan/website-structure-tools/delete-page.mjs |
Implements recursive deletion logic to remove child pages before parent |
agents/plan/user-add-page/* |
New workflow for adding pages, finding related pages, and inserting appropriate links |
agents/plan/user-remove-page/* |
New workflow for removing pages and cleaning up invalid references |
utils/constants.mjs |
Defines shared YAML_STRINGIFY_OPTIONS constant for consistent serialization |
| Multiple agent files | Updates to use centralized YAML_STRINGIFY_OPTIONS instead of inline options |
agents/clear/clear-generated-pages.mjs |
Removes unused results from return value |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
agents/plan/user-remove-page/remove-invalid-links-from-page.mjs
Outdated
Show resolved
Hide resolved
agents/plan/user-remove-page/remove-invalid-links-from-page.mjs
Outdated
Show resolved
Hide resolved
wangshijun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
新增的代码有些需要单元测试覆盖,可以都加上
lban2049
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related Issue
Major Changes
Screenshots
Test Plan
Checklist
dependenciesordevDependencies.pnpm-lock.yaml).Summary by AIGNE
Release Notes
New Features:
Bug Fixes:
Refactor: