Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several enhancements across different areas of the project, including build system improvements, agent functionality updates, and documentation enhancements. Key changes include the addition of a new
WebScrapertool, a revamped build process usingesbuild, and optimizations to theWebLoaderclass for better web scraping capabilities.Environment and Configuration Updates:
.env.example: AddedMCP_GITHUB_TOKENandMCP_ATLASSIAN_TOKENfor authentication, enabling integration with GitHub and Atlassian services.config/mcp.template.json: Updated environment variable handling to allow dynamic substitution from the.envfile usingThis pull request introduces several enhancements across different areas of the project, including build system improvements, agent functionality updates, and documentation enhancements. Key changes include the addition of a newWebScrapertool, a revamped build process usingesbuild, and optimizations to theWebLoader` class for better web scraping capabilities.notation.
Build System Enhancements:
build.js: Introduced a new build script usingesbuildfor efficient bundling and watching ofsrc/ui/main.ts. This replaces the previous TypeScript compilation workflow.package.json: Updated scripts to integrate the new build system (ui:build,ui:dev,ui:clean,ui:copy-assets) and addedesbuildas a development dependency.Agent Functionality Improvements:
src/agent.py: Added a newWebScrapertool to the agent's toolset, enabling advanced web scraping capabilities. [1] [2]src/core/mcp/session.py: Implemented_parse_envto dynamically resolve environment variables during session initialization, improving flexibility and reducing hardcoded values. [1] [2]Web Scraper Tool Implementation:
src/libs/dataloader/web.py: Enhanced theWebLoaderclass with URL replacement functionality and improved recursion handling for web scraping. Added a mechanism to limit the number of processed URLs. [1] [2] [3] [4]src/tools/web_scraper.py: Created theWebScrapertool to extract content from web pages, supporting features like JavaScript rendering and structured data extraction.Documentation Enhancements:
docs/ideas/agent-behavior.md: Added a comprehensive strategy document outlining optimizations for agent behavior, including context-aware prompts, specialized capabilities, and proactive error prevention.UI Updates:
src/ui/index.html: Updated the script reference fromchat.jstobundle.jsto align with the new build system.