Skip to content

Remove inline type restriction from TypeScript AI script generation #6100

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

claude[bot]
Copy link
Contributor

@claude claude bot commented Jul 1, 2025

Summary

Removes the requirement to inline object types in TypeScript AI chat prompts as requested in #6099.

Changes made:

  • Modified TS_INLINE_TYPE_INSTRUCTION in frontend/src/lib/components/copilot/chat/script/core.ts
  • Removed the instruction that forced AI to inline object types instead of defining them separately
  • Kept the guidance about using RT.ResourceType for resource types

Before:

const TS_INLINE_TYPE_INSTRUCTION = `When using resource types, you should use RT.ResourceType as parameter type. For other parameters, you should inline the objects types instead of defining them separately. This is because Windmill requires the types (other than resource types) to be inlined to generate a user friendly UI from the parameters.`

After:

const TS_INLINE_TYPE_INSTRUCTION = `When using resource types, you should use RT.ResourceType as parameter type.`

Test plan

  • Frontend validation passed (npm run check - 0 errors)
  • No breaking changes detected
  • Test AI chat with TypeScript script generation to verify types are no longer forced to be inlined

Fixes #6099

Generated with Claude Code

Remove the requirement to inline object types in TypeScript AI chat prompts. The AI will now only receive guidance about using RT.ResourceType for resource types, without being forced to inline other parameter types.

Fixes #6099

Co-authored-by: Ruben Fiszel <[email protected]>
@centdix
Copy link
Collaborator

centdix commented Jul 1, 2025

/ai change TS_INLINE_TYPE_INSTRUCTION to TS_RESOURCE_TYPE_INSTRUCTION

Copy link

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: c6b4ddc
Status: ✅  Deploy successful!
Preview URL: https://d5143ab4.windmill.pages.dev
Branch Preview URL: https://claude-issue-6099-20250701-0.windmill.pages.dev

View logs

Copy link
Contributor Author

claude bot commented Jul 1, 2025

Claude encountered an error —— View job


Renaming constant as requested

Working on renaming TS_INLINE_TYPE_INSTRUCTION to TS_RESOURCE_TYPE_INSTRUCTION as requested.

Todo List:

  • Read the current file to understand context
  • Search for all references to the constant
  • Rename the constant and update references
  • Run frontend validation (npm run check)
  • Commit changes to the PR branch

Findings:

  • Found the constant defined on line 62: const TS_INLINE_TYPE_INSTRUCTION = 'When using resource types, you should use RT.ResourceType as parameter type.'
  • Found usage on line 200 in the getLangContext function

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.

Remove inline restriction in typescript ai script generation
1 participant