Skip to content

Conversation

noencke
Copy link
Contributor

@noencke noencke commented Sep 17, 2025

Description

This does various small refactors and cleanups to tree-agent. The LLM prompt now only includes information about editing arrays, maps, and objects if the schema contains arrays, maps, and objects respectively. This PR also removes the IdGenerator as it is no longer used.

Copy link
Contributor

@Copilot 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 PR refactors the tree-agent's prompt generation system to conditionally include editing information based on schema content and removes the unused IdGenerator class. The changes optimize LLM prompts by only including array/map/object editing instructions when those node types exist in the schema.

  • Removes the IdGenerator class entirely as it's no longer needed
  • Conditionally includes array and map editing documentation in prompts based on schema analysis
  • Simplifies the querying system by removing ID generation and management

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/framework/tree-agent/src/idGenerator.ts Complete removal of the IdGenerator class and its functionality
packages/framework/tree-agent/src/agent.ts Refactored prompt generation to conditionally include editing instructions and removed IdGenerator usage

const simpleSchema = getSimpleSchema(schema);
// Inspect the schema to determine what kinds of nodes are possible - this will affect how much information we need to include in the prompt.
Copy link
Preview

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

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

There's an extra space before 'how' in the comment. Should be 'this will affect how much information'.

Suggested change
// Inspect the schema to determine what kinds of nodes are possible - this will affect how much information we need to include in the prompt.
// Inspect the schema to determine what kinds of nodes are possible - this will affect how much information we need to include in the prompt.

Copilot uses AI. Check for mistakes.

@github-actions github-actions bot added base: main PRs targeted against main branch area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct labels Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants