Skip to content

Commit ec1ab23

Browse files
committed
Reduce automatic title update prompts
1 parent 449cf6a commit ec1ab23

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

cli/src/claude/utils/systemPrompt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { shouldIncludeCoAuthoredBy } from "./claudeSettings";
55
* Base system prompt shared across all configurations
66
*/
77
const BASE_SYSTEM_PROMPT = (() => trimIdent(`
8-
ALWAYS when you start a new chat - you must call a tool "mcp__hapi__change_title" to set a chat title. When you think chat title is not relevant anymore - call the tool again to change it. When chat name is too generic and you have a change to make it more specific - call the tool again to change it. This title is needed to easily find the chat in the future. Help human.
8+
Use the title tool sparingly. For a new chat, call the tool "mcp__hapi__change_title" once after the user's initial request is clear, and set a concise task title. Do not rename the chat for routine progress, substeps, implementation details, or a slightly better wording. Rename only when the user's primary objective changes substantially and the existing title would be misleading.
99
When you create or find a local image file that the user should see, call the tool "mcp__hapi__display_image" with the image path so HAPI can show it inline.
1010
`))();
1111

cli/src/codex/utils/systemPrompt.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ import { trimIdent } from '@/utils/trimIdent';
1313
* so the tool is called as `functions.hapi__change_title`.
1414
*/
1515
export const TITLE_INSTRUCTION = trimIdent(`
16-
ALWAYS when you start a new chat, call the title tool to set a concise task title.
16+
Use the title tool sparingly. For a new chat, call it once after the user's initial request is clear, and set a concise task title.
1717
Prefer calling functions.hapi__change_title.
1818
If that exact tool name is unavailable, call an equivalent alias such as hapi__change_title, mcp__hapi__change_title, or hapi_change_title.
19-
If the task focus changes significantly later, call the title tool again with a better title.
19+
Do not rename the chat for routine progress, substeps, implementation details, or a slightly better wording.
20+
Rename only when the user's primary objective changes substantially and the existing title would be misleading.
2021
When you create or find a local image file that the user should see, call functions.hapi__display_image with the image path. If that exact tool name is unavailable, use an equivalent alias such as hapi__display_image, mcp__hapi__display_image, or hapi_display_image.
2122
`);
2223

cli/src/opencode/utils/systemPrompt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { trimIdent } from '@/utils/trimIdent';
1111
* Title instruction for OpenCode to call the hapi MCP tool.
1212
*/
1313
export const TITLE_INSTRUCTION = trimIdent(`
14-
ALWAYS when you start a new chat - you must call the tool "hapi_change_title" to set a chat title. When you think chat title is not relevant anymore - call the tool again to change it. When chat name is too generic and you have a chance to make it more specific - call the tool again to change it. This title is needed to easily find the chat in the future. Help human.
14+
Use the title tool sparingly. For a new chat, call the tool "hapi_change_title" once after the user's initial request is clear, and set a concise task title. Do not rename the chat for routine progress, substeps, implementation details, or a slightly better wording. Rename only when the user's primary objective changes substantially and the existing title would be misleading.
1515
When you create or find a local image file that the user should see, call the tool "hapi_display_image" with the image path so HAPI can show it inline.
1616
`);
1717

0 commit comments

Comments
 (0)