Skip to content

Commit 61f951f

Browse files
committed
fix: improve task naming prompt to avoid URL content guessing
When a user creates a task with a URL-only prompt (e.g., "Work on #1234"), the LLM would previously hallucinate what the URL content might be about. This change adds examples to the system prompt showing expected behavior for GitHub issue and PR URLs, relying on examples rather than explicit instructions.
1 parent 82bb833 commit 61f951f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

coderd/taskname/taskname.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@ Prompt: "Set up CI/CD pipeline" →
7171
"task_name": "setup-cicd"
7272
}
7373
74+
Prompt: "Work on https://github.com/coder/coder/issues/1234" →
75+
{
76+
"display_name": "Work on issue #1234",
77+
"task_name": "issue-1234"
78+
}
79+
80+
Prompt: "Fix https://github.com/coder/coder/pull/567" →
81+
{
82+
"display_name": "Review PR #567",
83+
"task_name": "pr-567"
84+
}
85+
7486
If a suitable name cannot be created, output exactly:
7587
{
7688
"display_name": "Task Unnamed",

0 commit comments

Comments
 (0)