Skip to content

feat: enhance search tools and URL manipulation#122

Merged
ssdeanx merged 1 commit intomainfrom
develop
Mar 16, 2026
Merged

feat: enhance search tools and URL manipulation#122
ssdeanx merged 1 commit intomainfrom
develop

Conversation

@ssdeanx
Copy link
Copy Markdown
Owner

@ssdeanx ssdeanx commented Mar 16, 2026

  • Added numResults and sortBy parameters to googleSearchTool, amazonSearchTool, walmartSearchTool, ebaySearchTool, and homeDepotSearchTool to allow users to specify the number of results and sorting preferences.
  • Updated metadata logging to reflect the new numResults and sortBy parameters in the respective tools.
  • Refactored the technical-analysis.tool.ts to improve input handling by introducing default values for various parameters in the ichimokuCloudTool, fibonacciTool, pivotPointsTool, and other analysis tools.
  • Enhanced text-analysis.tool.ts to handle operations more flexibly by introducing a default operations array.
  • Introduced a new urlValidationTool and urlManipulationTool with comprehensive input and output schemas for validating and manipulating URLs, including detailed logging for input and output stages.
  • Created utility functions for URL manipulation, including adding, updating, and removing query parameters, with improved type safety using Zod schemas.
  • Added a new file nestedAgents.ts to provide a utility function for adapting nested agents to the expected type for parent registries, ensuring compatibility with stricter request-context generics.

- Added `numResults` and `sortBy` parameters to `googleSearchTool`, `amazonSearchTool`, `walmartSearchTool`, `ebaySearchTool`, and `homeDepotSearchTool` to allow users to specify the number of results and sorting preferences.
- Updated metadata logging to reflect the new `numResults` and `sortBy` parameters in the respective tools.
- Refactored the `technical-analysis.tool.ts` to improve input handling by introducing default values for various parameters in the `ichimokuCloudTool`, `fibonacciTool`, `pivotPointsTool`, and other analysis tools.
- Enhanced `text-analysis.tool.ts` to handle operations more flexibly by introducing a default operations array.
- Introduced a new `urlValidationTool` and `urlManipulationTool` with comprehensive input and output schemas for validating and manipulating URLs, including detailed logging for input and output stages.
- Created utility functions for URL manipulation, including adding, updating, and removing query parameters, with improved type safety using Zod schemas.
- Added a new file `nestedAgents.ts` to provide a utility function for adapting nested agents to the expected type for parent registries, ensuring compatibility with stricter request-context generics.
Copilot AI review requested due to automatic review settings March 16, 2026 16:23
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @ssdeanx, your pull request is larger than the review limit of 150000 diff characters

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-stack Error Error Mar 16, 2026 4:26pm

@github-actions
Copy link
Copy Markdown

🤖 Hi @ssdeanx, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@github-actions
Copy link
Copy Markdown

🤖 I'm sorry @ssdeanx, but I was unable to process your request. Please see the logs for more details.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 is a large PR that combines several themes: hardening Mastra tool/eval type safety by removing any casts and adding default values for nullable inputs, introducing a nestedAgents type adapter for agent registration, extensive UI component cleanup (import reordering, closed:data-[state=closed]: CSS fixes, context memoization, removing biome suppression comments), deleting many app/api/mastra/ proxy routes, and updating workspace scripts' import paths.

Changes:

  • Introduced asNestedAgents() adapter and applied it across all agent/network registrations to fix Mastra nested-agent typing issues; hardened tool execute functions with explicit default values for nullable parameters.
  • Cleaned eval scorers to remove any casts, standardize judge model strings, and add proper type narrowing; removed (scorer as any).run() from tests.
  • Deleted ~15 app/api/mastra/ proxy API routes and performed extensive UI component refactoring (import ordering, CSS data-attribute selectors, context value memoization, component reordering).

Reviewed changes

Copilot reviewed 173 out of 175 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/mastra/agents/nestedAgents.ts New boundary adapter for nested agent type compatibility
src/mastra/networks/*.ts, src/mastra/agents/*.ts, src/mastra/a2a/*.ts Apply asNestedAgents() to all child agent registrations
src/mastra/tools/*.ts (multiple) Add default values for nullable inputs, replace z.any() with z.unknown(), tighten hook typing
src/mastra/evals/scorers/*.ts Remove any casts, add typed interfaces, standardize judge model strings
src/mastra/evals/tests/*.ts Remove (scorer as any).run() pattern
src/components/ai-elements/*.tsx (many) Import reordering, closed:data-[state=closed]:, context memoization, component reordering
src/mastra/tools/confirmation.tool.ts Changed suspend flow to always return { confirmed: false } after suspend
src/mastra/harness.ts Added asHarnessAgent cast, removed initialState and defaultModelId
src/mastra/mcp/index.ts Commented out knowledgeIndexingAgent
app/api/mastra/** (many) Deleted proxy API routes for agents, tools, threads, traces, vectors, logs, memory, workflows
src/mastra/public/workspace/**/*.tsx Updated import paths from @/components/ to @/src/components/ or @/ui/
memory-bank/*.md, **/AGENTS.md Documentation updates reflecting changes
Comments suppressed due to low confidence (1)

app/api/mastra/agents/route.ts:1

  • Many API routes under app/api/mastra/ have been deleted (agents, tools, threads, traces, vectors, logs, memory, workflows, observability). These were backend proxy routes using MastraClient. If any frontend code or external consumers depend on these endpoints, they will break. Ensure that all references to these routes have been migrated to direct MastraClient usage or another approach before merging.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +26 to +30
| {
id: string;
approved: true;
reason?: string;
}
Comment on lines +166 to +174
const [formatted, setFormatted] = useState("");

// avoid calling Date.now() during render — compute relative time in an effect
const hasChildren = children !== undefined && children !== null;
const updateFormatted = useCallback(() => {
setFormatted(formatRelativeDate(date));
}, [date]);

useEffect(() => {
if (hasChildren) {return;}

const update = () => {
const days = Math.round(
(date.getTime() - Date.now()) / (1000 * 60 * 60 * 24)
);
setRelative(relativeTimeFormat.format(days, "day"));
};

update();

// refresh periodically so the relative label stays up-to-date
const id = window.setInterval(update, 60 * 60 * 1000);
return () => window.clearInterval(id);
}, [date, hasChildren]);

const display = children ?? (relative || date.toISOString());
updateFormatted();
}, [updateFormatted]);
{...props}
>
{children ?? suggestion}
{children || suggestion}
Comment thread src/mastra/mcp/index.ts
a2aCoordinator: a2aCoordinatorAgent,
codingCoordinator: codingA2ACoordinator,
knowledgeIndexing: knowledgeIndexingAgent,
// knowledgeIndexing: knowledgeIndexingAgent,
// Core Research Tools
fetchTool,
webScraperTool,
// webScraperTool,
Comment thread src/mastra/harness.ts
Comment on lines 55 to 57
storage: pgStore,
// State management
stateSchema: harnessStateSchema,
log.level === "log" && "text-foreground"
)}
key={`${log.timestamp.getTime()}-${index}`}
key={`${log.timestamp.getTime()}-${log.level}-${log.message}`}
: "text-foreground/90"
)}
key={`${frame.raw}-${index}`}
key={frame.raw}
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 16, 2026

Important

Review skipped

Too many files!

This PR contains 174 files, which is 24 over the limit of 150.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 435cf857-4d26-45d9-b5ec-e4c568320624

📥 Commits

Reviewing files that changed from the base of the PR and between b636aa9 and a7e4c39.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (174)
  • app/api/harness/route.ts
  • app/api/mastra/agents/[agentId]/route.ts
  • app/api/mastra/agents/route.ts
  • app/api/mastra/logs/[runId]/route.ts
  • app/api/mastra/logs/route.ts
  • app/api/mastra/memory/status/route.ts
  • app/api/mastra/memory/working-memory/route.ts
  • app/api/mastra/observability/scores/route.ts
  • app/api/mastra/threads/[threadId]/clone/route.ts
  • app/api/mastra/threads/[threadId]/messages/route.ts
  • app/api/mastra/threads/[threadId]/route.ts
  • app/api/mastra/threads/route.ts
  • app/api/mastra/tools/[toolId]/route.ts
  • app/api/mastra/tools/route.ts
  • app/api/mastra/traces/[traceId]/route.ts
  • app/api/mastra/traces/route.ts
  • app/api/mastra/vectors/[vectorName]/query/route.ts
  • app/api/mastra/vectors/[vectorName]/route.ts
  • app/api/mastra/vectors/route.ts
  • app/api/mastra/workflows/[workflowId]/route.ts
  • app/api/mastra/workflows/[workflowId]/run/route.ts
  • app/api/mastra/workflows/route.ts
  • app/chat/harness/page.tsx
  • lib/AGENTS.md
  • lib/hooks/use-mastra-query.ts
  • lib/hooks/use-mastra.ts
  • memory-bank/activeContext.md
  • memory-bank/progress.md
  • package.json
  • src/components/ai-elements/artifact.tsx
  • src/components/ai-elements/attachments.tsx
  • src/components/ai-elements/audio-player.tsx
  • src/components/ai-elements/canvas.tsx
  • src/components/ai-elements/chain-of-thought.tsx
  • src/components/ai-elements/checkpoint.tsx
  • src/components/ai-elements/code-block.tsx
  • src/components/ai-elements/commit.tsx
  • src/components/ai-elements/confirmation.tsx
  • src/components/ai-elements/context.tsx
  • src/components/ai-elements/controls.tsx
  • src/components/ai-elements/conversation.tsx
  • src/components/ai-elements/edge.tsx
  • src/components/ai-elements/environment-variables.tsx
  • src/components/ai-elements/file-tree.tsx
  • src/components/ai-elements/image.tsx
  • src/components/ai-elements/inline-citation.tsx
  • src/components/ai-elements/jsx-preview.tsx
  • src/components/ai-elements/message.tsx
  • src/components/ai-elements/mic-selector.tsx
  • src/components/ai-elements/model-selector.tsx
  • src/components/ai-elements/node.tsx
  • src/components/ai-elements/open-in-chat.tsx
  • src/components/ai-elements/package-info.tsx
  • src/components/ai-elements/panel.tsx
  • src/components/ai-elements/persona.tsx
  • src/components/ai-elements/plan.tsx
  • src/components/ai-elements/prompt-input.tsx
  • src/components/ai-elements/queue.tsx
  • src/components/ai-elements/reasoning.tsx
  • src/components/ai-elements/sandbox.tsx
  • src/components/ai-elements/schema-display.tsx
  • src/components/ai-elements/shimmer.tsx
  • src/components/ai-elements/snippet.tsx
  • src/components/ai-elements/sources.tsx
  • src/components/ai-elements/speech-input.tsx
  • src/components/ai-elements/stack-trace.tsx
  • src/components/ai-elements/suggestion.tsx
  • src/components/ai-elements/task.tsx
  • src/components/ai-elements/terminal.tsx
  • src/components/ai-elements/test-results.tsx
  • src/components/ai-elements/tool.tsx
  • src/components/ai-elements/toolbar.tsx
  • src/components/ai-elements/transcription.tsx
  • src/components/ai-elements/voice-selector.tsx
  • src/components/ai-elements/web-preview.tsx
  • src/mastra/a2a/AGENTS.md
  • src/mastra/a2a/a2aCoordinatorAgent.ts
  • src/mastra/a2a/codingA2ACoordinator.ts
  • src/mastra/agents/AGENTS.md
  • src/mastra/agents/customerSupportAgent.ts
  • src/mastra/agents/nestedAgents.ts
  • src/mastra/agents/projectManagementAgent.ts
  • src/mastra/agents/researchAgent.ts
  • src/mastra/agents/seoAgent.ts
  • src/mastra/agents/socialMediaAgent.ts
  • src/mastra/agents/translationAgent.ts
  • src/mastra/evals/AGENTS.md
  • src/mastra/evals/agent-experiments.ts
  • src/mastra/evals/scorers/custom-scorers.ts
  • src/mastra/evals/scorers/factuality.scorer.ts
  • src/mastra/evals/scorers/financial-scorers.ts
  • src/mastra/evals/scorers/keyword-coverage.ts
  • src/mastra/evals/scorers/prebuilt.ts
  • src/mastra/evals/scorers/utils.ts
  • src/mastra/evals/tests/completeness.test.ts
  • src/mastra/evals/tests/context-precision.test.ts
  • src/mastra/evals/tests/context-relevance.test.ts
  • src/mastra/evals/tests/keyword-coverage.test.ts
  • src/mastra/evals/tests/noise-sensitivity.test.ts
  • src/mastra/evals/tests/tone-consistency.test.ts
  • src/mastra/evals/tests/tool-call-accuracy.test.ts
  • src/mastra/harness.ts
  • src/mastra/mcp/index.ts
  • src/mastra/networks/AGENTS.md
  • src/mastra/networks/businessIntelligenceNetwork.ts
  • src/mastra/networks/codingTeamNetwork.ts
  • src/mastra/networks/contentCreationNetwork.ts
  • src/mastra/networks/dataPipelineNetwork.ts
  • src/mastra/networks/devopsNetwork.ts
  • src/mastra/networks/financialIntelligenceNetwork.ts
  • src/mastra/networks/index.ts
  • src/mastra/networks/learningNetwork.ts
  • src/mastra/networks/marketingAutomationNetwork.ts
  • src/mastra/networks/reportGenerationNetwork.ts
  • src/mastra/networks/researchPipelineNetwork.ts
  • src/mastra/networks/securityNetwork.ts
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/agent.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/artifact.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/attachments-inline.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/attachments-list.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/attachments.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/audio-player-remote.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/audio-player.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/chain-of-thought.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/checkpoint.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/code-block-dark.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/code-block.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/commit.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/confirmation-accepted.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/confirmation-rejected.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/confirmation-request.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/confirmation.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/context.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/conversation.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/environment-variables.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/file-tree-basic.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/file-tree-expanded.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/file-tree-selection.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/file-tree.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/image.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/inline-citation.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/jsx-preview.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/message.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/mic-selector.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/model-selector.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/open-in-chat.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/persona-command.tsx
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/persona-glint.tsx
  • src/mastra/tools/AGENTS.md
  • src/mastra/tools/alpha-vantage.tool.ts
  • src/mastra/tools/chartjs.tool.ts
  • src/mastra/tools/code-chunking.ts
  • src/mastra/tools/color-change-tool.ts
  • src/mastra/tools/confirmation.tool.ts
  • src/mastra/tools/csv-to-json.tool.ts
  • src/mastra/tools/data-processing-tools.ts
  • src/mastra/tools/document-chunking.tool.ts
  • src/mastra/tools/e2b.ts
  • src/mastra/tools/extractLearningsTool.ts
  • src/mastra/tools/find-references.tool.ts
  • src/mastra/tools/find-symbol.tool.ts
  • src/mastra/tools/git-local.tool.ts
  • src/mastra/tools/github.ts
  • src/mastra/tools/image-tool.ts
  • src/mastra/tools/json-to-csv.tool.ts
  • src/mastra/tools/pdf-data-conversion.tool.ts
  • src/mastra/tools/random-generator.tool.ts
  • src/mastra/tools/serpapi-academic-local.tool.ts
  • src/mastra/tools/serpapi-news-trends.tool.ts
  • src/mastra/tools/serpapi-search.tool.ts
  • src/mastra/tools/serpapi-shopping.tool.ts
  • src/mastra/tools/technical-analysis.tool.ts
  • src/mastra/tools/text-analysis.tool.ts
  • src/mastra/tools/url-tool.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use OpenGrep to find security vulnerabilities and bugs across 17+ programming languages.

OpenGrep is compatible with Semgrep configurations. Add an opengrep.yml or semgrep.yml configuration file to your project to enable OpenGrep analysis.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces significant enhancements to the system's capabilities for searching and manipulating URLs, alongside a comprehensive effort to bolster type safety, streamline input handling, and improve logging across a wide array of tools and agent configurations. It marks a strategic shift in API interaction patterns and expands the frontend's direct access to core Mastra client functionalities, ensuring a more robust and maintainable codebase.

Highlights

  • Enhanced Search & URL Tools: Introduced new numResults and sortBy parameters to various search tools (Amazon, Walmart, eBay, Home Depot, Google Search, Google Scholar, Yelp, Google News, Google Trends) and created dedicated urlValidationTool and urlManipulationTool with comprehensive schemas and detailed logging.
  • Improved Type Safety & Input Handling: Refactored technical-analysis.tool.ts and text-analysis.tool.ts to include default values for parameters and operations, enhancing flexibility and robustness. Extensive type safety improvements were applied across numerous tools and UI components.
  • Mastra Client Integration & API Refactoring: Removed numerous direct app/api/mastra API routes, indicating a shift towards direct client-side interaction or a consolidated API layer. The use-mastra-query.ts and use-mastra.ts hooks were extended to expose the full @mastra/client-js dataset, evaluation, and scorer API surfaces to frontend consumers.
  • Evals & Agent Hardening: Hardened evaluation utilities and scorers by removing unsafe any patterns, standardizing judge-backed eval models to google/gemini-3.1-flash-lite-preview, and refining experiment running logic. A new nestedAgents.ts utility was added to address specific typing challenges with nested agent configurations.
  • UI Component Refinements: Various UI components (artifact, attachments, chain-of-thought, code-block, commit, confirmation, context, environment-variables, file-tree, jsx-preview, message, mic-selector, open-in-chat, package-info, persona, plan, prompt-input, queue, reasoning, sandbox, schema-display, shimmer, snippet, sources, stack-trace, suggestion, task, terminal, test-results, tool, web-preview) received updates for improved type safety, accessibility, and minor bug fixes, including a strict mode safe Rive initialization.
Changelog
  • app/api/harness/route.ts
    • Removed the harness API route.
  • app/api/mastra/agents/[agentId]/route.ts
    • Removed the agent detail API route.
  • app/api/mastra/agents/route.ts
    • Removed the agents listing API route.
  • app/api/mastra/logs/[runId]/route.ts
    • Removed the run logs API route.
  • app/api/mastra/logs/route.ts
    • Removed the logs listing API route.
  • app/api/mastra/memory/status/route.ts
    • Removed the memory status API route.
  • app/api/mastra/memory/working-memory/route.ts
    • Removed the working memory API route.
  • app/api/mastra/observability/scores/route.ts
    • Removed the observability scores API route.
  • app/api/mastra/threads/[threadId]/clone/route.ts
    • Removed the thread clone API route.
  • app/api/mastra/threads/[threadId]/messages/route.ts
    • Removed the thread messages API route.
  • app/api/mastra/threads/[threadId]/route.ts
    • Removed the thread detail API route.
  • app/api/mastra/threads/route.ts
    • Removed the threads listing API route.
  • app/api/mastra/tools/[toolId]/route.ts
    • Removed the tool detail and execution API route.
  • app/api/mastra/tools/route.ts
    • Removed the tools listing API route.
  • app/api/mastra/traces/[traceId]/route.ts
    • Removed the trace detail API route.
  • app/api/mastra/traces/route.ts
    • Removed the traces listing API route.
  • app/api/mastra/vectors/[vectorName]/query/route.ts
    • Removed the vector query API route.
  • app/api/mastra/vectors/[vectorName]/route.ts
    • Removed the vector index management API route.
  • app/api/mastra/vectors/route.ts
    • Removed the vectors listing API route.
  • app/api/mastra/workflows/[workflowId]/route.ts
    • Removed the workflow detail API route.
  • app/api/mastra/workflows/[workflowId]/run/route.ts
    • Removed the workflow run API route.
  • app/api/mastra/workflows/route.ts
    • Removed the workflows listing API route.
  • lib/AGENTS.md
    • Updated with recent changes regarding Mastra hooks for dataset/eval/scorer surfaces.
  • lib/hooks/use-mastra-query.ts
    • Extended to expose comprehensive dataset, eval, and scorer API surfaces from @mastra/client-js.
  • lib/hooks/use-mastra.ts
    • Extended to mirror the dataset, eval, and scorer API surfaces using useMastraFetch.
  • memory-bank/activeContext.md
    • Updated with recent context updates on Mastra evals, frontend dataset/eval hook coverage, nested agent typing cleanup, and tool typing/hook hardening.
  • memory-bank/progress.md
    • Updated with recent progress on Mastra evals hardening, nested-agent type fixes, and tools strict-clean pass.
  • package.json
    • Updated various dependency versions and the project version to 1.3.1.
  • src/components/ai-elements/artifact.tsx
    • Refactored imports and updated conditional rendering for sr-only text.
  • src/components/ai-elements/attachments.tsx
    • Refactored imports and updated conditional rendering for attachment labels and image alt text.
  • src/components/ai-elements/audio-player.tsx
    • Refactored imports.
  • src/components/ai-elements/canvas.tsx
    • Refactored imports.
  • src/components/ai-elements/chain-of-thought.tsx
    • Refactored imports, updated collapsible content animation class, and adjusted max-height for images.
  • src/components/ai-elements/checkpoint.tsx
    • Refactored imports.
  • src/components/ai-elements/code-block.tsx
    • Refactored imports, updated CSS class for dark mode, adjusted fontStyle check, moved LINE_NUMBER_CLASSES constant, removed console error comment, updated onClick handler for copy button, and refactored state management for code highlighting to handle async tokens more robustly.
  • src/components/ai-elements/commit.tsx
    • Refactored imports, updated CommitTimestamp logic for relative date formatting, and removed unnecessary biome-ignore comments.
  • src/components/ai-elements/confirmation.tsx
    • Refactored imports, added a new type for ToolUIPartApproval, and memoized context value.
  • src/components/ai-elements/context.tsx
    • Refactored imports, moved TokensWithCost component, and updated conditional rendering.
  • src/components/ai-elements/controls.tsx
    • Refactored imports.
  • src/components/ai-elements/conversation.tsx
    • Refactored imports, updated messagesToMarkdown to use UIMessage and extract text from parts, and removed ConversationMessage interface.
  • src/components/ai-elements/edge.tsx
    • Refactored imports.
  • src/components/ai-elements/environment-variables.tsx
    • Refactored imports, reordered EnvironmentVariable component, and updated conditional rendering.
  • src/components/ai-elements/file-tree.tsx
    • Refactored imports, updated FileTreeProps type, extracted FileTreeIcon and FileTreeName components, refactored FileTreeFolder to improve accessibility and layout, and removed unnecessary biome-ignore comments.
  • src/components/ai-elements/image.tsx
    • Refactored imports.
  • src/components/ai-elements/inline-citation.tsx
    • Refactored imports and updated InlineCitationCarouselIndex to use useCallback for syncState.
  • src/components/ai-elements/jsx-preview.tsx
    • Refactored imports, updated JSXPreviewContextValue interface, fixed matchJsxTag to use String.prototype.match, added stripIncompleteTag utility, refined completeJsxTag logic, and improved error handling and streaming behavior for JSXPreviewContent.
  • src/components/ai-elements/message.tsx
    • Refactored imports, updated conditional rendering for sr-only text, adjusted childrenArray memoization, and refined MessageResponse memoization.
  • src/components/ai-elements/mic-selector.tsx
    • Refactored imports, moved useAudioDevices hook, and updated MicSelectorLabel to use String.prototype.match.
  • src/components/ai-elements/model-selector.tsx
    • Refactored imports.
  • src/components/ai-elements/node.tsx
    • Refactored imports.
  • src/components/ai-elements/open-in-chat.tsx
    • Refactored imports, memoized context value, and updated DropdownMenuContent width.
  • src/components/ai-elements/package-info.tsx
    • Refactored imports, reordered PackageInfo component, and updated conditional rendering for versions.
  • src/components/ai-elements/panel.tsx
    • Refactored imports.
  • src/components/ai-elements/persona.tsx
    • Refactored imports, added useStrictModeSafeInit hook for Rive initialization, and updated Rive state machine input handling.
  • src/components/ai-elements/plan.tsx
    • Refactored imports and memoized context value.
  • src/components/ai-elements/prompt-input.tsx
    • Refactored imports, added captureScreenshot utility and PromptInputActionAddScreenshot component, updated attachment and referenced sources state types, refined useEffect for syncHiddenInput, and adjusted handleSubmit to handle file conversions and onSubmit results.
  • src/components/ai-elements/queue.tsx
    • Refactored imports, updated QueueItemContent and QueueItemFile CSS classes, and adjusted ChevronDownIcon class for collapsible state.
  • src/components/ai-elements/reasoning.tsx
    • Refactored imports, updated setIsOpen type, removed Omit from ReasoningProps, removed this: void from onOpenChange and getThinkingMessage types, and simplified Streamdown component usage.
  • src/components/ai-elements/sandbox.tsx
    • Refactored imports and updated collapsible content animation class.
  • src/components/ai-elements/schema-display.tsx
    • Refactored imports, reordered SchemaDisplay component, updated SchemaDisplayPath to use String.prototype.match and children ?? highlightedPath, removed SchemaDisplayBody, reordered SchemaDisplayParameters, and updated conditional rendering for descriptions and properties.
  • src/components/ai-elements/shimmer.tsx
    • Refactored imports and updated CSS class for background size.
  • src/components/ai-elements/snippet.tsx
    • Refactored imports and memoized context value.
  • src/components/ai-elements/sources.tsx
    • Refactored imports and updated collapsible content animation class.
  • src/components/ai-elements/speech-input.tsx
    • Refactored imports.
  • src/components/ai-elements/stack-trace.tsx
    • Refactored imports, updated regex matching for stack frames, updated onClick handler for copy button, updated collapsible content animation class, and refined StackTraceFrames rendering.
  • src/components/ai-elements/suggestion.tsx
    • Refactored imports and updated conditional rendering for suggestion text.
  • src/components/ai-elements/task.tsx
    • Refactored imports and updated collapsible content animation class.
  • src/components/ai-elements/terminal.tsx
    • Refactored imports, reordered Terminal component, removed Shimmer usage in TerminalStatus, removed handleClick from TerminalCopyButton, and updated TerminalContent CSS class.
  • src/components/ai-elements/test-results.tsx
    • Refactored imports, reordered TestResults component, extracted TestStatusIcon and related constants, and updated conditional rendering for test results.
  • src/components/ai-elements/tool.tsx
    • Refactored imports, updated collapsible content animation class, and refined conditional rendering for tool output.
  • src/components/ai-elements/toolbar.tsx
    • Refactored imports.
  • src/components/ai-elements/transcription.tsx
    • Refactored imports.
  • src/components/ai-elements/voice-selector.tsx
    • Refactored imports.
  • src/components/ai-elements/web-preview.tsx
    • Refactored imports, updated WebPreviewConsoleProps type, updated collapsible content animation class, and refined WebPreviewConsole keying.
  • src/mastra/a2a/AGENTS.md
    • Added a typing note about nestedAgents boundary adapter and updated changelog.
  • src/mastra/a2a/a2aCoordinatorAgent.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/a2a/codingA2ACoordinator.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/agents/AGENTS.md
    • Added a guideline for nested agent registration and updated changelog.
  • src/mastra/agents/customerSupportAgent.ts
    • Removed googleAI3 import, imported asNestedAgents, and wrapped agent configurations with it.
  • src/mastra/agents/nestedAgents.ts
    • Added a new file defining asNestedAgents utility for type adaptation.
  • src/mastra/agents/projectManagementAgent.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/agents/researchAgent.ts
    • Removed pgMemory import and commented out webScraperTool usage.
  • src/mastra/agents/seoAgent.ts
    • Removed googleAI3 import, imported asNestedAgents, and wrapped agent configurations with it.
  • src/mastra/agents/socialMediaAgent.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/agents/translationAgent.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/evals/AGENTS.md
    • Updated purpose and guidelines for eval scorers, including new recommendations for local agent experiments, dataset item shaping, judge-backed scorers, custom scorer types, and avoiding any.
  • src/mastra/evals/agent-experiments.ts
    • Refactored experiment running logic into a generic runAgentExperiment function, updated all experiment calls to use it, and removed direct runEvals calls.
  • src/mastra/evals/scorers/custom-scorers.ts
    • Refactored sourceDiversityScorer and researchCompletenessScorer to use extractAgentResponseMessages and handle output parsing more robustly, and added type: 'agent' to scorers.
  • src/mastra/evals/scorers/factuality.scorer.ts
    • Updated judge model to google/gemini-3.1-flash-lite-preview.
  • src/mastra/evals/scorers/financial-scorers.ts
    • Refactored financialDataScorer to use parseFinancialOutput for robust JSON parsing and updated judge model.
  • src/mastra/evals/scorers/keyword-coverage.ts
    • Refactored keywordCoverageScorer to use getRequiredKeywords for safer access to request context and improved type safety.
  • src/mastra/evals/scorers/prebuilt.ts
    • Refactored createNoiseSensitivityScorerLLM to use getUserMessageFromRunInput, createTextualDifferenceScorer to use getGroundTruth and handle analysis results more safely, and createContextRelevanceScorerLLM and createContextPrecisionScorer to use new options interfaces.
  • src/mastra/evals/scorers/utils.ts
    • Added new types (ContentWithReasoning, ReasoningPart, ToolInvocation), helper functions (isRecord, toText, getUserMessageFromRunInput), and refined existing functions for improved type safety and robustness.
  • src/mastra/evals/tests/completeness.test.ts
    • Updated scorer run calls to remove as any.
  • src/mastra/evals/tests/context-precision.test.ts
    • Updated scorer run calls to use createAgentTestRun and remove as any.
  • src/mastra/evals/tests/context-relevance.test.ts
    • Updated scorer run calls to use createAgentTestRun and remove as any.
  • src/mastra/evals/tests/keyword-coverage.test.ts
    • Updated scorer run calls to remove as any.
  • src/mastra/evals/tests/noise-sensitivity.test.ts
    • Updated scorer run calls to remove as any.
  • src/mastra/evals/tests/tone-consistency.test.ts
    • Updated scorer run calls to remove as any.
  • src/mastra/evals/tests/tool-call-accuracy.test.ts
    • Updated scorer run calls to remove as any.
  • src/mastra/harness.ts
    • Imported MastraAgent, added asHarnessAgent utility, removed initialState, and wrapped agent configurations with asHarnessAgent. Also removed defaultModelId from explore and quick-fix modes.
  • src/mastra/mcp/index.ts
    • Commented out knowledgeIndexing agent.
  • src/mastra/networks/AGENTS.md
    • Updated markdown fence language and added a typing note about nestedAgents boundary adapter and updated changelog.
  • src/mastra/networks/businessIntelligenceNetwork.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/networks/codingTeamNetwork.ts
    • Imported asNestedAgents, simplified evaluateQuality return, and wrapped agent configurations with it.
  • src/mastra/networks/contentCreationNetwork.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/networks/dataPipelineNetwork.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/networks/devopsNetwork.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/networks/financialIntelligenceNetwork.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/networks/index.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/networks/learningNetwork.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/networks/marketingAutomationNetwork.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/networks/reportGenerationNetwork.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/networks/researchPipelineNetwork.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/networks/securityNetwork.ts
    • Imported asNestedAgents and wrapped agent configurations with it.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/agent.tsx
    • Updated import path for ai-elements/agent.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/artifact.tsx
    • Updated import paths for ai-elements/artifact and ai-elements/code-block.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/attachments-inline.tsx
    • Updated import path for ai-elements/attachments.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/attachments-list.tsx
    • Updated import path for ai-elements/attachments.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/attachments.tsx
    • Updated import path for ai-elements/attachments.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/audio-player-remote.tsx
    • Updated import path for ai-elements/audio-player.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/audio-player.tsx
    • Updated import path for ai-elements/audio-player.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/chain-of-thought.tsx
    • Updated import paths for ai-elements/chain-of-thought and ai-elements/image.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/checkpoint.tsx
    • Updated import paths for ai-elements/checkpoint, ai-elements/conversation, and ai-elements/message.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/code-block-dark.tsx
    • Updated import path for ai-elements/code-block.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/code-block.tsx
    • Updated import path for ai-elements/code-block.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/commit.tsx
    • Updated import path for ai-elements/commit.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/confirmation-accepted.tsx
    • Updated import path for ai-elements/confirmation.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/confirmation-rejected.tsx
    • Updated import path for ai-elements/confirmation.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/confirmation-request.tsx
    • Updated import path for ai-elements/confirmation.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/confirmation.tsx
    • Updated import path for ai-elements/confirmation.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/context.tsx
    • Updated import path for ai-elements/context.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/conversation.tsx
    • Updated import paths for ai-elements/conversation and ai-elements/message.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/environment-variables.tsx
    • Updated import path for ai-elements/environment-variables.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/file-tree-basic.tsx
    • Updated import path for ai-elements/file-tree.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/file-tree-expanded.tsx
    • Updated import path for ai-elements/file-tree.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/file-tree-selection.tsx
    • Updated import path for ai-elements/file-tree.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/file-tree.tsx
    • Updated import path for ai-elements/file-tree.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/image.tsx
    • Updated import path for ai-elements/image.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/inline-citation.tsx
    • Updated import path for ai-elements/inline-citation.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/jsx-preview.tsx
    • Updated import paths for ai-elements/jsx-preview and ui/button.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/message.tsx
    • Updated import paths for ai-elements/attachments and ai-elements/message.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/mic-selector.tsx
    • Updated import path for ai-elements/mic-selector.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/model-selector.tsx
    • Updated import paths for ai-elements/model-selector and ui/button.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/open-in-chat.tsx
    • Updated import path for ai-elements/open-in-chat.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/persona-command.tsx
    • Updated import paths for ai-elements/persona, ui/button, and ui/button-group.
  • src/mastra/public/workspace/workspace/skills/ai-elements/scripts/persona-glint.tsx
    • Updated import paths for ai-elements/persona, ui/button, and ui/button-group.
  • src/mastra/tools/alpha-vantage.tool.ts
    • Updated alphaVantageCryptoTool to conditionally append market parameter and use params.append for better control.
  • src/mastra/tools/chartjs.tool.ts
    • Refactored chartJsTool to define schemas as constants, added detailed onInputStart, onInputDelta, onInputAvailable, and onOutput hooks, and provided default values for indicator periods. Also added type guards and improved data handling.
  • src/mastra/tools/code-chunking.ts
    • Updated codeChunkerTool to use inputData directly instead of destructuring input.
  • src/mastra/tools/color-change-tool.ts
    • Defined schemas as constants, added detailed onInputStart, onInputDelta, onInputAvailable, and onOutput hooks, and removed redundant hook definitions.
  • src/mastra/tools/confirmation.tool.ts
    • Updated confirmationTool to handle suspend as an awaitable function and return a default confirmed: false if suspend is not provided.
  • src/mastra/tools/csv-to-json.tool.ts
    • Refined onOutput logging to safely extract recordsProcessed from output.
  • src/mastra/tools/data-processing-tools.ts
    • Updated ExcalidrawElementSchema and ExcalidrawSchema to use z.unknown() instead of z.any(), and provided default values for Excalidraw element properties in excalidrawToSVGTool for better type safety.
  • src/mastra/tools/document-chunking.tool.ts
    • Provided default values for chunkingStrategy, chunkSize, chunkOverlap, indexName, embeddingModel, and embeddingBatchSize. Updated conditional checks for extractTitle, extractSummary, extractKeywords, extractQuestions to use nullish coalescing. Adjusted parameter passing for chunking and embedding operations.
  • src/mastra/tools/e2b.ts
    • Updated listFiles to handle empty path gracefully and log the resolved path. Updated getFileSize to explicitly check humanReadable === true.
  • src/mastra/tools/extractLearningsTool.ts
    • Removed tracingContext from execute and refined onOutput to safely parse output data.
  • src/mastra/tools/find-references.tool.ts
    • Refactored findReferencesTool to resolve projectPath with a default process.cwd() and use symbolName and projectPath directly.
  • src/mastra/tools/find-symbol.tool.ts
    • Provided default values for symbolType and includeDependencies, and resolved projectPath with a default process.cwd().
  • src/mastra/tools/git-local.tool.ts
    • Provided a default value for count in gitLogTool.
  • src/mastra/tools/github.ts
    • Updated getRepoFileTree to resolve branch to the default branch if not provided.
  • src/mastra/tools/image-tool.ts
    • Provided default values for operations in imageProcessorTool and headingLevel in imageToMarkdownTool.
  • src/mastra/tools/json-to-csv.tool.ts
    • Provided default values for options in jsonToCsvTool and refined onOutput to safely extract csvOutput.
  • src/mastra/tools/pdf-data-conversion.tool.ts
    • Changed extractPdfMetadata to be synchronous, provided default values for outputFormat, includeMetadata, includeTables, includeImages, and normalizeText. Updated onInputStart, onInputDelta, onInputAvailable hooks to simplify parameters. Refined rootSpan creation and conditional checks for normalizeText, includeTables, includeImages, includeMetadata, and outputFormat.
  • src/mastra/tools/random-generator.tool.ts
    • Provided default values for count and updated metadata logging to use the resolved count.
  • src/mastra/tools/serpapi-academic-local.tool.ts
    • Updated googleScholarTool and yelpSearchTool to conditionally append num and sortby parameters, and explicitly check boolean values.
  • src/mastra/tools/serpapi-news-trends.tool.ts
    • Updated googleNewsTool and googleNewsLiteTool to conditionally append num parameter. Updated googleTrendsTool to conditionally append geo and date parameters.
  • src/mastra/tools/serpapi-search.tool.ts
    • Provided a default value for numResults in googleSearchTool and updated metadata logging to use the resolved numResults.
  • src/mastra/tools/serpapi-shopping.tool.ts
    • Provided default values for numResults and sortBy in amazonSearchTool, walmartSearchTool, ebaySearchTool, and homeDepotSearchTool. Updated metadata logging and parameter passing to use the resolved values.
  • src/mastra/tools/technical-analysis.tool.ts
    • Removed StochasticOutput interface. Provided default values for conversionPeriod, basePeriod, spanPeriod, displacement in ichimokuCloudTool. Updated onInputDelta, onInputAvailable, onOutput hooks to simplify parameters. Provided default values for period, fastPeriod, slowPeriod, signalPeriod in trendAnalysisTool, momentumAnalysisTool, volatilityAnalysisTool, and volumeAnalysisTool.
  • src/mastra/tools/text-analysis.tool.ts
    • Provided a default value for operations in textAnalysisTool and updated metadata logging to use the resolved operations.
  • src/mastra/tools/url-tool.ts
    • Defined new Zod schemas for UrlScalar, UrlQueryRecord, UrlParameterValue, UrlValidationInputSchema, UrlValidationOutputSchema, UrlManipulationInputSchema, and UrlManipulationOutputSchema. Added detailed onInputStart, onInputDelta, onInputAvailable, and onOutput hooks for both urlValidationTool and urlManipulationTool. Provided a default for operations in urlValidationTool. Refined shortenUrl to be synchronous. Added serializeUrlScalar and describeParameterValue helper functions. Updated addQueryParams and updateQueryParams to use serializeUrlScalar. Refined getOperationDescription to use describeParameterValue and UrlQueryRecord.
Activity
  • The pull request involves extensive code changes across various files, indicating a significant refactoring and feature enhancement effort.
  • The removal of numerous app/api/mastra routes suggests a shift in how the frontend interacts with Mastra services, possibly moving towards direct client-side interaction or a consolidated API layer.
  • Updates to lib/hooks/use-mastra-query.ts and lib/hooks/use-mastra.ts imply a broader exposure of Mastra client functionalities to frontend consumers, enhancing the UI's ability to interact with datasets, evaluations, and scorers.
  • The detailed updates in memory-bank/activeContext.md and memory-bank/progress.md indicate a structured approach to development, with clear documentation of changes and validation steps.
  • Numerous changes in src/components/ai-elements suggest a general cleanup and improvement of UI components, focusing on type safety, accessibility, and minor bug fixes.
  • Extensive modifications in src/mastra/tools and src/mastra/evals highlight a strong focus on improving the robustness, type safety, and logging of existing tools and evaluation mechanisms. The introduction of nestedAgents.ts addresses a specific typing challenge with nested agents.
  • The package.json update reflects dependency upgrades, ensuring the project uses the latest stable versions of its libraries.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@ssdeanx ssdeanx merged commit a18cb8c into main Mar 16, 2026
83 of 88 checks passed
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a major refactoring by removing numerous redundant API routes (e.g., for harness, agents, logs, memory, tools, traces, vectors, and workflows) as frontend functionalities now directly leverage the @mastra/client-js library. The lib/hooks/use-mastra-query.ts and lib/hooks/use-mastra.ts files have been significantly expanded to expose the full dataset, evaluation, and scorer API surface of @mastra/client-js to React Query and generic React consumers, respectively. Additionally, dependency versions in package.json have been updated, and various UI components have been refactored for improved type safety, consistency, and accessibility, including changes to CodeBlock for Shiki highlighting, CommitTimestamp for relative date formatting, JSXPreview for robust streaming error handling, PromptInput to support screenshot attachments, and several other components to refine prop handling and class names. A new nestedAgents.ts utility was added to src/mastra/agents to manage nested agent typing, and numerous Mastra tools and evaluation scorers have undergone a strict type cleanup, removing any types, adding explicit default values, and normalizing hook placements and output schemas for better reliability and maintainability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants