Files
oak-gpui/crates
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
..
2024-05-29 18:06:45 -07:00
2024-07-23 15:01:05 -07:00
2024-04-30 23:31:59 -06:00
2024-08-13 23:06:07 -07:00
2024-07-23 15:01:05 -07:00
2024-03-11 10:45:57 +01:00
2024-07-15 17:04:15 -06:00
2024-07-25 09:00:53 -06:00
2024-06-21 16:32:32 -07:00
2024-08-09 13:37:54 -04:00
2024-07-26 03:31:41 -04:00
2024-08-09 13:37:54 -04:00
2024-04-15 14:21:52 +02:00
2024-08-13 23:06:07 -07:00
2024-08-14 12:46:00 -04:00