Skip to content
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

Instruct Coder to use replace when search and replace fails #15061

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

JonasHelming
Copy link
Contributor

fixed #15060

What it does

  • Add instructions to the coder prompt to fall back to full file rewrite if replace fails continously (this is already mentioned in the function description, but sometimes does not work)
  • Clarify more precisely that only one successful function call per file is allowed (previous description might imply you are only allow to call one function even if it fails)

How to test

  • Was tested in pre-test already
  • Play around with prompts and LLMs
    Expected behavior: It uses replace when "it make sense" and rewrite when "it makes sense". It switches to rewrite if replaces fails.

Some example prompts:

@coder Rename the function toOpenAIMessage in packages/ai-openai/src/node/openai-language-model.ts to convertToOpenAIMessage

@coder Add o13 and o14-mini to the default list of open ai models in the preferences of the openai package

@coder Move the readme file to a sub direcotry called /readme

@coder Implement the interface MCPServerManager in the same file (packages/ai-mcp/src/common/mcp-server-manager.ts). Don't ask me anything, jut do it.

@coder Remove the prefix "MCP" from all user message in packages/ai-mcp/src/browser/mcp-command-contribution.ts

@coder Do not display a message to the user anymore about the tools in packages/ai-mcp/src/browser/mcp-command-contribution.ts

@coder Allow the user to start already started MCP servers again in packages/ai-mcp/src/browser/mcp-command-contribution.ts

@coder please translate all of the comments in packages/ai-chat/src/browser/change-set-file-element.ts into Swahili.

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

@JonasHelming JonasHelming requested a review from planger February 26, 2025 11:31
@JonasHelming JonasHelming mentioned this pull request Feb 26, 2025
6 tasks
Copy link
Contributor

@planger planger left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me! 👍

@JonasHelming JonasHelming merged commit fc98501 into master Feb 26, 2025
10 of 11 checks passed
@github-actions github-actions bot added this to the 1.59.0 milestone Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Theia AI] Instruct Coder to use replace when search and replace fails
2 participants