Skip to content

fix create tool in the AI chat#6673

Open
EthanHealy01 wants to merge 12 commits into
mainfrom
bug/CreateAgentFix
Open

fix create tool in the AI chat#6673
EthanHealy01 wants to merge 12 commits into
mainfrom
bug/CreateAgentFix

Conversation

@EthanHealy01

@EthanHealy01 EthanHealy01 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

AI PDF creation ("create a PDF for me") has been broken since the Policies backend (#6527) introduced PolicyExecutor as the tool execution pipeline. PolicyExecutor runs normal single-input tools with a per-file loop, but generator tools like create-pdf-from-html-agent take no input file and build their output purely from parameters. With zero input files the loop ran zero times, so the endpoint was never called and the step silently produced nothing. The chat reported success ("Created Purchase Order") while no document ever appeared.

This adds an else if (inputFiles.isEmpty()) branch so a generator tool is called once with an empty file list, matching what the multi-input branch already does for an empty input. Two files changed: the one-line-ish fix in PolicyExecutor, and a regression test covering the no-input case.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines ignoring generated files. Bugfix Pull requests that fix bugs labels Jun 15, 2026
Base automatically changed from SaaS to main June 16, 2026 15:41
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines ignoring generated files. and removed size:S This PR changes 10-29 lines ignoring generated files. labels Jun 16, 2026
@stirlingbot stirlingbot Bot added Java Pull requests that update Java code Front End Issues or pull requests related to front-end development Test Testing-related issues or pull requests engine and removed Bugfix Pull requests that fix bugs labels Jun 16, 2026
@dosubot dosubot Bot added size:S This PR changes 10-29 lines ignoring generated files. and removed size:XXL This PR changes 1000+ lines ignoring generated files. labels Jun 16, 2026
Comment thread frontend/editor/src/proprietary/components/chat/ChatContext.tsx
Comment thread frontend/editor/src/core/services/buildApiUrl.ts Outdated
EthanHealy01 and others added 2 commits June 17, 2026 14:32
…licy/engine/PolicyExecutor.java


remove verbose comments

Co-authored-by: James Brunton <jbrunton96@gmail.com>
reecebrowne
reecebrowne previously approved these changes Jun 17, 2026
# Conflicts:
#	frontend/editor/src/proprietary/components/chat/ChatContext.tsx
#	frontend/editor/src/prototypes/components/chat/ChatContext.tsx
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines ignoring generated files. and removed size:S This PR changes 10-29 lines ignoring generated files. labels Jun 18, 2026
@stirlingbot stirlingbot Bot removed Front End Issues or pull requests related to front-end development Translation labels Jun 18, 2026
@EthanHealy01 EthanHealy01 requested a review from reecebrowne June 18, 2026 17:14
@stirlingbot

stirlingbot Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

🚀 V2 Auto-Deployment Complete!

Your V2 PR with embedded architecture has been deployed!

🔗 Direct Test URL (non-SSL) http://54.175.155.236:6673

🔐 Secure HTTPS URL: https://6673.ssl.stirlingpdf.cloud

This deployment will be automatically cleaned up when the PR is closed.

🔄 Auto-deployed for approved V2 contributors.

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

Labels

engine Java Pull requests that update Java code size:XS This PR changes 0-9 lines ignoring generated files. Test Testing-related issues or pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants