ZIm/assets/prompts
Nathan Sobo ad44b459cd
Improve content generation prompt to reduce over-generation (#16333)
I focused on cases where we're inserting doc comments or annotations
above symbols.

I added 5 new examples to the content generation prompt, covering
various scenarios:

1. Inserting documentation for a Rust struct
2. Writing docstrings for a Python class
3. Adding comments to a TypeScript method
4. Adding a derive attribute to a Rust struct
5. Adding a decorator to a Python class

These examples demonstrate how to handle different languages and common
tasks like adding documentation, attributes, and decorators.

To improve context integration, I've made the following changes:

1. Added a `transform_context_range` that includes 3 lines before and
after the transform range
2. Introduced `rewrite_section_prefix` and `rewrite_section_suffix` to
provide more context around the section being rewritten
3. Updated the prompt template to include this additional context in a
separate code snippet

Release Notes:

- Reduced instances of over-generation when inserting docs or
annotations above a symbol.
2024-08-15 22:20:11 -06:00
..
content_prompt.hbs Improve content generation prompt to reduce over-generation (#16333) 2024-08-15 22:20:11 -06:00
edit_workflow.hbs Improve workflow prompt, accept nonexistent directories from workflows (#16251) 2024-08-14 16:18:41 -06:00
step_resolution.hbs Improve workflow suggestion steps and debug info (#16309) 2024-08-15 22:46:19 +03:00
terminal_assistant_prompt.hbs Allow prompt templates to be overridden in the zed configuration directory (#15887) 2024-08-06 19:30:48 -06:00