Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit 9e96cf5

Browse files
Improve prompts for single file explanation
1 parent 635a77e commit 9e96cf5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

client/src/components/Chat/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ const Chat = () => {
310310
lineEnd,
311311
};
312312
userQuery = t(
313-
`Explain lines {{lineStart}} - {{lineEnd}} in {{filePath}}`,
313+
`Explain the purpose of the file {{filePath}}, from lines {{lineStart}} - {{lineEnd}}`,
314314
{
315315
lineStart: Number(lineStart) + 1,
316316
lineEnd: Number(lineEnd) + 1,

server/bleep/src/agent/prompts.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,15 @@ pub fn answer_article_prompt(aliases: &[usize], context: &str) -> String {
173173
let one_prompt = format!(
174174
r#"{context}#####
175175
176-
A user is looking at the code above, they'd like you to answer their queries.
176+
A user is looking at the code above, your job is to write an article answering their query.
177177
178178
Your output will be interpreted as bloop-markdown which renders with the following rules:
179179
- Inline code must be expressed as a link to the correct line of code using the URL format: `[bar](src/foo.rs#L50)` or `[bar](src/foo.rs#L50-L54)`
180180
- Do NOT output bare symbols. ALL symbols must include a link
181181
- E.g. Do not simply write `Bar`, write [`Bar`](src/bar.rs#L100-L105).
182182
- E.g. Do not simply write "Foos are functions that create `Foo` values out of thin air." Instead, write: "Foos are functions that create [`Foo`](src/foo.rs#L80-L120) values out of thin air."
183183
- Only internal links to the current file work
184+
- Basic markdown text formatting rules are allowed, and you should use titles to improve readability
184185
185186
Here is an example response:
186187

0 commit comments

Comments
 (0)