fix(schedule): 简化自动化任务标题,去除时间与执行备注 (#6105)

* fix(schedule): keep timing and execution notes out of task titles

* fix(schedule): avoid repeating task title guidance

* fix(schedule): keep title guidance examples in English

---------

Co-authored-by: ZiyaZhang <[email protected]>
This commit is contained in:
ZiyaandZiyaZhang authored and GitHub committed 2026-10-13 05:38:34 -07:00
1 parent 2b302a1814
commit 9f5bc9669b
11 files changed
+27 -19

No files matched your search

+2 -2
View File
@@ -1397,7 +1397,7 @@ Create a reminder in the current session that delivers prompt when it becomes du
},
"title": {
"type": "string",
"description": "Task name of at most 120 characters, shown on the task card and in task lists."
"description": "Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt."
},
"after_seconds": {
"type": "number",
@@ -1558,7 +1558,7 @@ Change a reminder in place, keeping its id. Supply a new title, prompt, or at mo
},
"title": {
"type": "string",
"description": "New task name of at most 120 characters."
"description": "New task name; follow the schedule_create title rules."
},
"prompt": {
"type": "string",
+2 -2
View File
@@ -1403,7 +1403,7 @@ create、edit、pause 和 resume 要求直接来自人类的根权限;complete
},
"title": {
"type": "string",
"description": "Task name of at most 120 characters, shown on the task card and in task lists."
"description": "Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt."
},
"after_seconds": {
"type": "number",
@@ -1564,7 +1564,7 @@ create、edit、pause 和 resume 要求直接来自人类的根权限;complete
},
"title": {
"type": "string",
"description": "New task name of at most 120 characters."
"description": "New task name; follow the schedule_create title rules."
},
"prompt": {
"type": "string",
@@ -42,8 +42,8 @@
en: 3039bc5e7a796b21
zh: 6b7a9eaf69c9ea53
/deepseek-ai-dsh-tool-schedule/model-experience/tool-schemas/what-the-model-sees:
en: 82465f7520c67ddd
zh: eb9014c758b687c5
en: 0056efd9de0ecd8c
zh: 6887c2dd9ed8587f
/deepseek-ai-dsh-tool-schedule/model-experience/tool-schemas/token-effect:
en: 70fb9094859d0804
zh: 30726b045484713c
+1 -1
View File
@@ -84,7 +84,7 @@ The plugin registers four `defineTool` definitions through the context that load
#### What the model sees
The generated [`schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` schemas](../../../docs/tool-catalog.md#deepseek-aidsh-tool-schedule) whenever this package is visible in the calling Agent's scope.
The generated [`schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` schemas](../../../docs/tool-catalog.md#deepseek-aidsh-tool-schedule) whenever this package is visible in the calling Agent's scope. Title guidance does not rewrite stored titles or add validation beyond the existing non-empty and length checks.
#### Token effect
+1 -1
View File
@@ -84,7 +84,7 @@ kind: "package-reference"
#### What the model sees
只要本包在调用方 Agent 的作用域内可见,模型就会收到生成的 [`schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-schedule)。
只要本包在调用方 Agent 的作用域内可见,模型就会收到生成的 [`schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-schedule)。标题指引不会改写已存标题,也不会在现有的非空和长度检查之外增加校验。
#### Token effect
+10 -2
View File
@@ -195,6 +195,14 @@ const UPDATE_DESCRIPTION =
'Change a reminder in place, keeping its id. Supply a new title, prompt, or at most one timing parameter; '
+ 'omitted fields keep their stored values. To change a relative delay, create a new reminder.'
const CREATE_TITLE_DESCRIPTION =
`Concise task name in the user's language, at most ${MAX_TITLE_LENGTH} characters. `
+ 'Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. '
+ 'Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, '
+ 'or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. '
+ 'Do not append parenthetical notes. '
+ 'Put scheduling information in the timing parameters and execution instructions in prompt.'
/** Deterministic model content for every canonical Schedule value. */
function renderValue(_args: unknown, value: unknown): ContentBlock[] {
// The ToolRuntime has already validated the value against the lossless-JSON output schema.
@@ -454,7 +462,7 @@ function registerScheduleTools(ctx: Context): void {
title: {
type: 'string',
required: true,
description: `Task name of at most ${MAX_TITLE_LENGTH} characters, shown on the task card and in task lists.`,
description: CREATE_TITLE_DESCRIPTION,
},
after_seconds: {
type: 'number',
@@ -534,7 +542,7 @@ function registerScheduleTools(ctx: Context): void {
id: { type: 'string', required: true, description: 'Schedule id returned by schedule_list.' },
title: {
type: 'string',
description: `New task name of at most ${MAX_TITLE_LENGTH} characters.`,
description: 'New task name; follow the schedule_create title rules.',
},
prompt: {
type: 'string',
@@ -130,7 +130,7 @@ describe('Schedule model tools', () => {
const schema = test.ctx.tools.schemas(test.agent).find(item => item.name === 'schedule_create')
const parameters = schema?.parameters as { properties: Record<string, { type?: string; description?: string }>; required: string[] }
expect(parameters.properties.title?.type).toBe('string')
expect(parameters.properties.title?.description).toContain('task card')
expect(parameters.properties.title?.description).toContain('Concise task name')
expect(parameters.required).toEqual(expect.arrayContaining(['prompt', 'title']))
const created = await execute(test, 'schedule_create', {
prompt: 'Check the queue\nand the backlog', title: ' Queue check ', every_seconds: 300,
@@ -408,7 +408,7 @@
},
"title": {
"type": "string",
"description": "Task name of at most 120 characters, shown on the task card and in task lists."
"description": "Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt."
},
"after_seconds": {
"type": "number",
@@ -554,7 +554,7 @@
},
"title": {
"type": "string",
"description": "New task name of at most 120 characters."
"description": "New task name; follow the schedule_create title rules."
},
"prompt": {
"type": "string",
@@ -186,7 +186,7 @@ interface ToolArgsMap {
schedule_create: {
/** Reminder content to present when the target becomes due. */
prompt: string;
/** Task name of at most 120 characters, shown on the task card and in task lists. */
/** Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt. */
title: string;
/** Delay in whole seconds. */
after_seconds?: number;
@@ -233,7 +233,7 @@ interface ToolArgsMap {
schedule_update: {
/** Schedule id returned by schedule_list. */
id: string;
/** New task name of at most 120 characters. */
/** New task name; follow the schedule_create title rules. */
title?: string;
/** New reminder content. */
prompt?: string;
@@ -186,7 +186,7 @@ interface ToolArgsMap {
schedule_create: {
/** Reminder content to present when the target becomes due. */
prompt: string;
/** Task name of at most 120 characters, shown on the task card and in task lists. */
/** Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt. */
title: string;
/** Delay in whole seconds. */
after_seconds?: number;
@@ -233,7 +233,7 @@ interface ToolArgsMap {
schedule_update: {
/** Schedule id returned by schedule_list. */
id: string;
/** New task name of at most 120 characters. */
/** New task name; follow the schedule_create title rules. */
title?: string;
/** New reminder content. */
prompt?: string;
@@ -186,7 +186,7 @@ interface ToolArgsMap {
schedule_create: {
/** Reminder content to present when the target becomes due. */
prompt: string;
/** Task name of at most 120 characters, shown on the task card and in task lists. */
/** Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt. */
title: string;
/** Delay in whole seconds. */
after_seconds?: number;
@@ -233,7 +233,7 @@ interface ToolArgsMap {
schedule_update: {
/** Schedule id returned by schedule_list. */
id: string;
/** New task name of at most 120 characters. */
/** New task name; follow the schedule_create title rules. */
title?: string;
/** New reminder content. */
prompt?: string;