Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(builtin-tool-task): expose `lobe-task` and add `setTaskSchedule` (#14713)

Arvin Xu5ff4590fc1a6
diff --git a/locales/en-US/plugin.json b/locales/en-US/plugin.json
index 39de89c9b3a..190690e53c4 100644
--- a/locales/en-US/plugin.json
+++ b/locales/en-US/plugin.json
@@ -265,6 +265,7 @@
"builtins.lobe-task.apiName.listTasks": "List tasks",
"builtins.lobe-task.apiName.runTask": "Run task",
"builtins.lobe-task.apiName.runTasks": "Run tasks",
+ "builtins.lobe-task.apiName.setTaskSchedule": "Set schedule",
"builtins.lobe-task.apiName.updateTaskComment": "Update comment",
"builtins.lobe-task.apiName.updateTaskStatus": "Update status",
"builtins.lobe-task.apiName.viewTask": "View task",
diff --git a/locales/zh-CN/plugin.json b/locales/zh-CN/plugin.json
index 4c63e5722d7..b152b49d400 100644
--- a/locales/zh-CN/plugin.json
+++ b/locales/zh-CN/plugin.json
@@ -265,6 +265,7 @@
"builtins.lobe-task.apiName.listTasks": "任务列表",
"builtins.lobe-task.apiName.runTask": "启动任务",
"builtins.lobe-task.apiName.runTasks": "批量启动任务",
+ "builtins.lobe-task.apiName.setTaskSchedule": "设置调度",
"builtins.lobe-task.apiName.updateTaskComment": "更新评论",
"builtins.lobe-task.apiName.updateTaskStatus": "更新状态",
"builtins.lobe-task.apiName.viewTask": "查看任务",
diff --git a/packages/builtin-tool-task/src/client/Inspector/SetTaskSchedule/index.tsx b/packages/builtin-tool-task/src/client/Inspector/SetTaskSchedule/index.tsx
new file mode 100644
index 00000000000..c4d2cfa887f
--- /dev/null
+++ b/packages/builtin-tool-task/src/client/Inspector/SetTaskSchedule/index.tsx
@@ -0,0 +1,75 @@
+'use client';
+
+import type { BuiltinInspectorProps } from '@lobechat/types';
+import { createStaticStyles, cx } from 'antd-style';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { inspectorTextStyles, shinyTextStyles } from '@/styles';
+
+import type { SetTaskScheduleParams, SetTaskScheduleState } from '../../../types';
+
+const styles = createStaticStyles(({ css, cssVar }) => ({
+ identifierChip: css`
+ flex-shrink: 0;
+
+ padding-block: 2px;
+ padding-inline: 8px;
+ border-radius: 999px;
+
+ font-family: ${cssVar.fontFamilyCode};
+ font-size: 12px;
+ color: ${cssVar.colorTextSecondary};
+
+ background: ${cssVar.colorFillTertiary};
+ `,
+ modeChip: css`
+ flex-shrink: 0;
+
+ padding-block: 2px;
+ padding-inline: 8px;
+ border-radius: 999px;
+
+ font-size: 12px;
+ color: ${cssVar.colorInfo};
+
+ background: ${cssVar.colorInfoBg};
+ `,
+ separator: css`
+ flex-shrink: 0;
+ color: ${cssVar.colorTextQuaternary};
+ `,
+}));
+
+export const SetTaskScheduleInspector = memo<
+ BuiltinInspectorProps<SetTaskScheduleParams, SetTaskScheduleState>
+>(({ args, partialArgs, isArgumentsStreaming, isLoading }) => {
+ const { t } = useTranslation('plugin');
+
+ const identifier = args?.identifier || partialArgs?.identifier;
+ const automationMode = args?.automationMode ?? partialArgs?.automationMode;
+ const modeLabel = automationMode === null ? 'off' : automationMode;
+
+ return (
+ <div
+ style={{ flexWrap: 'wrap', gap: 4 }}
+ className={cx(
+ inspectorTextStyles.root,
+ (isArgumentsStreaming || isLoading) && shinyTextStyles.shinyText,
+ )}
+ >
+ <span>{t('builtins.lobe-task.apiName.setTaskSchedule')}</span>
+ {identifier && <span className={styles.identifierChip}>{identifier}</span>}
+ {modeLabel && (
+ <>
+ <span className={styles.separator}>·</span>
+ <span className={styles.modeChip}>{modeLabel}</span>
+ </>
+ )}
+ </div>
+ );
+});
+
+SetTaskScheduleInspector.displayName = 'SetTaskScheduleInspector';
+
+export default SetTaskScheduleInspector;
diff --git a/packages/builtin-tool-task/src/client/Inspector/index.ts b/packages/builtin-tool-task/src/client/Inspector/index.ts
index f95f6d858b3..4414ca50f1e 100644
--- a/packages/builtin-tool-task/src/client/Inspector/index.ts
+++ b/packages/builtin-tool-task/src/client/Inspector/index.ts
@@ -8,6 +8,7 @@ import { EditTaskInspector } from './EditTask';
import { ListTasksInspector } from './ListTasks';
import { RunTaskInspector } from './RunTask';
import { RunTasksInspector } from './RunTasks';
+import { SetTaskScheduleInspector } from './SetTaskSchedule';
import {
AddTaskCommentInspector,
DeleteTaskCommentInspector,
@@ -32,6 +33,7 @@ export const TaskInspectors: Record<string, BuiltinInspector> = {
[TaskApiName.listTasks]: ListTasksInspector as BuiltinInspector,
[TaskApiName.runTask]: RunTaskInspector as BuiltinInspector,
[TaskApiName.runTasks]: RunTasksInspector as BuiltinInspector,
+ [TaskApiName.setTaskSchedule]: SetTaskScheduleInspector as BuiltinInspector,
[TaskApiName.updateTaskComment]: UpdateTaskCommentInspector as BuiltinInspector,
[TaskApiName.updateTaskStatus]: UpdateTaskStatusInspector as BuiltinInspector,
[TaskApiName.viewTask]: ViewTaskInspector as BuiltinInspector,
@@ -44,6 +46,7 @@ export { EditTaskInspector } from './EditTask';
export { ListTasksInspector } from './ListTasks';
export { RunTaskInspector } from './RunTask';
export { RunTasksInspector } from './RunTasks';
+export { SetTaskScheduleInspector } from './SetTaskSchedule';
export {
AddTaskCommentInspector,
DeleteTaskCommentInspector,
diff --git a/packages/builtin-tool-task/src/executor/index.ts b/packages/builtin-tool-task/src/executor/index.ts
index 55b16a4ca23..caea02d43ba 100644
--- a/packages/builtin-tool-task/src/executor/index.ts
+++ b/packages/builtin-tool-task/src/executor/index.ts
@@ -8,7 +8,12 @@ import {
formatTaskList,
priorityLabel,
} from '@lobechat/prompts';
-import type { BuiltinToolContext, BuiltinToolResult, TaskStatus } from '@lobechat/types';
+import type {
+ BuiltinToolContext,
+ BuiltinToolResult,
+ TaskAutomationMode,
+ TaskStatus,
+} from '@lobechat/types';
import { BaseExecutor } from '@lobechat/types';
import debug from 'debug';
@@ -326,6 +331,113 @@ class TaskExecutor extends BaseExecutor<typeof TaskApiName> {
}
};
+ setTaskSchedule = async (
+ params: {
+ automationMode?: TaskAutomationMode | null;
+ heartbeatInterval?: number;
+ identifier: string;
+ maxExecutions?: number | null;
+ schedulePattern?: string | null;
+ scheduleTimezone?: string | null;
+ },
+ _ctx?: BuiltinToolContext,
+ ): Promise<BuiltinToolResult> => {
+ try {
+ log('[TaskExecutor] setTaskSchedule - params:', params);
+
+ const { identifier } = params;
+ const store = getTaskStoreState();
+ const changes: string[] = [];
+ const ops: Promise<unknown>[] = [];
+
+ // Top-level schedule columns — direct service.update bypasses the
+ // store.updateTask optimistic path, which would otherwise need to map
+ // flat columns onto the detail's nested `schedule.*` shape.
+ const scheduleUpdate: {
+ automationMode?: TaskAutomationMode | null;
+ heartbeatInterval?: number;
+ schedulePattern?: string | null;
+ scheduleTimezone?: string | null;
+ } = {};
+ if (params.automationMode !== undefined) {
+ scheduleUpdate.automationMode = params.automationMode;
+ changes.push(
+ params.automationMode
+ ? `automation mode → ${params.automationMode}`
+ : 'automation disabled',
+ );
+ }
+ if (params.heartbeatInterval !== undefined) {
+ scheduleUpdate.heartbeatInterval = params.heartbeatInterval;
+ changes.push(
+ params.heartbeatInterval > 0
+ ? `heartbeat interval → ${params.heartbeatInterval}s`
+ : 'heartbeat interval cleared',
+ );
+ }
+ if (params.schedulePattern !== undefined) {
+ scheduleUpdate.schedulePattern = params.schedulePattern;
+ changes.push(
+ params.schedulePattern
+ ? `schedule pattern → "${params.schedulePattern}"`
+ : 'schedule pattern cleared',
+ );
+ }
+ if (params.scheduleTimezone !== undefined) {
+ scheduleUpdate.scheduleTimezone = params.scheduleTimezone;
+ changes.push(
+ params.scheduleTimezone
+ ? `schedule timezone → ${params.scheduleTimezone}`
+ : 'schedule timezone cleared',
+ );
+ }
+ if (Object.keys(scheduleUpdate).length > 0) {
+ ops.push(taskService.update(identifier, scheduleUpdate));
+ }
+
+ // maxExecutions lives in `tasks.config.schedule.maxExecutions` (JSONB);
+ // route through updateConfig so the server-side merge preserves siblings
+ // (checkpoint, review, model snapshot, etc).
+ if (params.maxExecutions !== undefined) {
+ ops.push(
+ taskService.updateConfig(identifier, {
+ schedule: { maxExecutions: params.maxExecutions },
+ }),
+ );
+ changes.push(
+ params.maxExecutions === null
+ ? 'max executions cleared (unlimited)'
+ : `max executions → ${params.maxExecutions}`,
+ );
+ }
+
+ if (ops.length === 0) {
+ return {
+ content: 'No schedule fields provided; nothing to update.',
+ error: { message: 'No schedule fields provided.', type: 'NoFields' },
+ success: false,
+ };
+ }
+
+ await Promise.all(ops);
+ await store.internal_refreshTaskDetail(identifier);
+
+ return {
+ content: formatTaskEdited(identifier, changes),
+ state: { automationMode: params.automationMode, identifier, success: true },
+ success: true,
+ };
+ } catch (error) {
+ log('[TaskExecutor] setTaskSchedule - error:', error);
+ const message = error instanceof Error ? error.message : 'Failed to set task schedule';
+ return {
+ content: `Failed to set task schedule: ${message}`,
+ error: { message, type: 'SetTaskScheduleFailed' },
+ success: false,
+ };
+ }
+ };
+
listTasks = async (
params: {
assigneeAgentId?: string;
diff --git a/packages/builtin-tool-task/src/manifest.ts b/packages/builtin-tool-task/src/manifest.ts
index 478cd9b3319..9173b6f30cb 100644
--- a/packages/builtin-tool-task/src/manifest.ts
+++ b/packages/builtin-tool-task/src/manifest.ts
@@ -207,7 +207,7 @@ export const TaskManifest: BuiltinToolManifest = {
},
{
description:
- "Edit a task's fields (name, description, instruction, priority), parent, or dependencies (batched). Status changes go through updateTaskStatus.",
+ "Edit a task's fields (name, description, instruction, priority), parent, or dependencies (batched). Status changes go through updateTaskStatus; schedule configuration goes through setTaskSchedule.",
name: TaskApiName.editTask,
parameters: {
properties: {
@@ -299,6 +299,47 @@ export const TaskManifest: BuiltinToolManifest = {
type: 'object',
},
},
+ {
+ description:
+ 'Configure (or clear) the recurring schedule of a task. Use this to turn a task into a periodically running one, switch between cron (`schedule`) and fixed-interval (`heartbeat`) automation, or disable automation entirely. Pass automationMode=null to stop the task from auto-running. For schedule mode, supply schedulePattern (cron) and scheduleTimezone (IANA). For heartbeat mode, supply heartbeatInterval (seconds). maxExecutions caps how many scheduled runs may fire (null = unlimited). Status changes still go through updateTaskStatus; this tool only touches schedule configuration.',
+ name: TaskApiName.setTaskSchedule,
+ parameters: {
+ properties: {
+ automationMode: {
+ description:
+ 'Enables periodic execution. "schedule" fires on the cron `schedulePattern`; "heartbeat" ticks every `heartbeatInterval` seconds. Pass null to disable automation entirely.',
+ enum: ['heartbeat', 'schedule', null],
+ type: ['string', 'null'],
+ },
+ heartbeatInterval: {
+ description:
+ 'Periodic execution interval in seconds (heartbeat mode). Pass 0 to clear the interval. Recommend ≥600s.',
+ type: 'number',
+ },
+ identifier: {
+ description: 'The identifier of the task to configure (e.g. "TASK-1").',
+ type: 'string',
+ },
+ maxExecutions: {
+ description:
+ 'Cap on the number of scheduled executions for this task. Pass null to remove the cap (run indefinitely).',
+ type: ['number', 'null'],
+ },
+ schedulePattern: {
+ description:
+ 'Cron expression for scheduled mode, e.g. "0 9 * * *" (every day at 09:00). Pass null to clear the pattern.',
+ type: ['string', 'null'],
+ },
+ scheduleTimezone: {
+ description:
+ 'IANA timezone for the cron expression, e.g. "Asia/Shanghai" or "America/New_York". Pass null to clear; defaults to UTC when unset.',
+ type: ['string', 'null'],
+ },
+ },
+ required: ['identifier'],
+ type: 'object',
+ },
+ },
{
description:
"Update a task's status. Use to mark tasks as completed, canceled, paused, resumed, or failed. To START a task (transition into running), use runTask — it actually launches the agent. updateTaskStatus only flips the status flag without execution. If identifier is omitted, this only works when there is a current task context.",
diff --git a/packages/builtin-tool-task/src/systemRole.ts b/packages/builtin-tool-task/src/systemRole.ts
index 6fa8310d09b..5deff63b505 100644
--- a/packages/builtin-tool-task/src/systemRole.ts
+++ b/packages/builtin-tool-task/src/systemRole.ts
@@ -5,12 +5,19 @@ export const systemPrompt = `You have access to Task management tools. Use them
- **listTasks**: List tasks. With no filters, defaults to top-level unfinished tasks of the current agent in normal agent conversations, or top-level unfinished tasks across all agents in task manager conversations. If you provide any filter, omitted filters are not applied implicitly
- **viewTask**: View details of a specific task. Omitting identifier only works when there is a current task context
- **addTaskComment / updateTaskComment / deleteTaskComment**: Record, revise, or remove task comments. Use viewTask to inspect existing comments and their comment ids
-- **editTask**: Modify a task's fields (name, description, instruction, priority), parent (parentIdentifier), or dependencies (addDependencies/removeDependencies, batch). Use parentIdentifier=null to move a task to the top level. For status changes use updateTaskStatus
+- **editTask**: Modify a task's fields (name, description, instruction, priority), parent (parentIdentifier), or dependencies (addDependencies/removeDependencies, batch). Use parentIdentifier=null to move a task to the top level. For status changes use updateTaskStatus; for schedule configuration use setTaskSchedule
+- **setTaskSchedule**: Configure (or clear) the recurring schedule of a task. Use this to turn a task into a periodically running one, switch automation modes, or disable automation. See "Schedule fields" below for the supported params
- **runTask**: Actually START a task — kicks off the assigned agent in a new (or continued) topic. Use this to launch execution; do NOT use updateTaskStatus(running) to start a task, that only flips a flag without executing. The task must have an assigneeAgentId
- **runTasks**: Start multiple tasks in one call. Prefer this when launching a batch of related subtasks (e.g. all subtasks you just created); cuts down on tool calls and makes the start atomic from the user's perspective
- **updateTaskStatus**: Change a task's status. If you mark a task as failed, include an error message explaining why. Use this to mark tasks completed/cancelled/paused/failed — NOT to start them (use runTask for that). Omitting identifier only works when there is a current task context
- **deleteTask**: Delete a task. Subtasks become top-level (not cascaded); dependencies/topics/comments cascade-delete; irreversible
+Schedule fields (setTaskSchedule):
+- **automationMode**: 'schedule' (cron-based) or 'heartbeat' (fixed interval). Pass null to disable automation
+- **schedulePattern + scheduleTimezone**: cron expression (e.g. "0 9 * * *") and IANA timezone (e.g. "Asia/Shanghai"); used by schedule mode
+- **heartbeatInterval**: seconds between ticks; used by heartbeat mode (recommend ≥600s). Pass 0 to clear
+- **maxExecutions**: cap on total scheduled runs; null means unlimited
+
When planning work:
1. Create tasks for each major piece of work (use parentIdentifier to organize as subtasks)
2. Use editTask with addDependencies to control execution order
diff --git a/packages/builtin-tool-task/src/types.ts b/packages/builtin-tool-task/src/types.ts
index 1af19944255..43cd5cd615b 100644
--- a/packages/builtin-tool-task/src/types.ts
+++ b/packages/builtin-tool-task/src/types.ts
@@ -1,4 +1,4 @@
-import type { TaskStatus } from '@lobechat/types';
+import type { TaskAutomationMode, TaskStatus } from '@lobechat/types';
export const TaskApiName = {
/** Add a comment to a task */
@@ -28,6 +28,9 @@ export const TaskApiName = {
/** Trigger async runs for multiple tasks in one call */
runTasks: 'runTasks',
+ /** Configure (or clear) the recurring schedule of a task */
+ setTaskSchedule: 'setTaskSchedule',
+
/** Update a task comment */
updateTaskComment: 'updateTaskComment',
@@ -193,6 +196,28 @@ export interface RunTasksState {
succeeded: number;
}
+// ==================== setTaskSchedule ====================
+
+export interface SetTaskScheduleParams {
+ /** Switch automation mode. Pass null to disable automation entirely. */
+ automationMode?: TaskAutomationMode | null;
+ /** Periodic execution interval in seconds (heartbeat mode). Pass 0 to clear. */
+ heartbeatInterval?: number;
+ identifier: string;
+ /** Cap on the number of scheduled executions; null = unlimited. */
+ maxExecutions?: number | null;
+ /** Cron expression for scheduled mode. Pass null to clear. */
+ schedulePattern?: string | null;
+ /** IANA timezone for the cron expression. Pass null to clear. */
+ scheduleTimezone?: string | null;
+}
+
+export interface SetTaskScheduleState {
+ automationMode?: TaskAutomationMode | null;
+ identifier: string;
+ success: boolean;
+}
+
// ==================== updateTaskStatus ====================
export interface UpdateTaskStatusParams {
diff --git a/packages/builtin-tools/src/index.ts b/packages/builtin-tools/src/index.ts
index 3e5f01a9f98..2312b694ddb 100644
--- a/packages/builtin-tools/src/index.ts
+++ b/packages/builtin-tools/src/index.ts
@@ -245,8 +245,6 @@ export const builtinTools: LobeBuiltinTool[] = [
type: 'builtin',
},
{
- discoverable: false,
- hidden: true,
identifier: TaskManifest.identifier,
manifest: TaskManifest,
type: 'builtin',
diff --git a/packages/const/src/recommendedSkill.ts b/packages/const/src/recommendedSkill.ts
index 8352803f414..2fddea5ca9b 100644
--- a/packages/const/src/recommendedSkill.ts
+++ b/packages/const/src/recommendedSkill.ts
@@ -15,6 +15,7 @@ export const RECOMMENDED_SKILLS: RecommendedSkillItem[] = [
{ id: 'lobe-user-memory', type: RecommendedSkillType.Builtin },
{ id: 'lobe-cloud-sandbox', type: RecommendedSkillType.Builtin },
{ id: 'lobe-gtd', type: RecommendedSkillType.Builtin },
+ { id: 'lobe-task', type: RecommendedSkillType.Builtin },
{ id: 'lobe-agent-documents', type: RecommendedSkillType.Builtin },
{ id: 'lobe-message', type: RecommendedSkillType.Builtin },
// LobeHub skills
diff --git a/src/features/ProfileEditor/AgentTool.tsx b/src/features/ProfileEditor/AgentTool.tsx
index f7c47992454..57faf28ef3b 100644
--- a/src/features/ProfileEditor/AgentTool.tsx
+++ b/src/features/ProfileEditor/AgentTool.tsx
@@ -36,10 +36,7 @@ import {
lobehubSkillStoreSelectors,
pluginSelectors,
} from '@/store/tool/selectors';
-import {
- type LobeToolMetaWithAvailability,
- USER_HIDDEN_BUILTIN_TOOL_IDS,
-} from '@/store/tool/slices/builtin/selectors';
+import { type LobeToolMetaWithAvailability } from '@/store/tool/slices/builtin/selectors';
import PluginTag from './PluginTag';
import PopoverContent from './PopoverContent';
@@ -975,10 +972,7 @@ const AgentTool = memo<AgentToolProps>(
if (showWebBrowsing && isSearchEnabled && !tools.includes(WEB_BROWSING_IDENTIFIER)) {
tools.unshift(WEB_BROWSING_IDENTIFIER);
}
- return tools.filter(
- (toolId) =>
- !USER_HIDDEN_BUILTIN_TOOL_IDS.has(toolId) && !USER_HIDDEN_BUILTIN_SKILLS.has(toolId),
- );
+ return tools.filter((toolId) => !USER_HIDDEN_BUILTIN_SKILLS.has(toolId));
}, [plugins, isSearchEnabled, showWebBrowsing]);
return (
diff --git a/src/locales/default/plugin.ts b/src/locales/default/plugin.ts
index 9018f96d0d2..e103c15879f 100644
--- a/src/locales/default/plugin.ts
+++ b/src/locales/default/plugin.ts
@@ -265,6 +265,7 @@ export default {
'builtins.lobe-task.apiName.listTasks': 'List tasks',
'builtins.lobe-task.apiName.runTask': 'Run task',
'builtins.lobe-task.apiName.runTasks': 'Run tasks',
+ 'builtins.lobe-task.apiName.setTaskSchedule': 'Set schedule',
'builtins.lobe-task.apiName.updateTaskComment': 'Update comment',
'builtins.lobe-task.apiName.updateTaskStatus': 'Update status',
'builtins.lobe-task.apiName.viewTask': 'View task',
diff --git a/src/store/tool/slices/builtin/selectors.test.ts b/src/store/tool/slices/builtin/selectors.test.ts
index b3d78ac799a..903a47a5e43 100644
--- a/src/store/tool/slices/builtin/selectors.test.ts
+++ b/src/store/tool/slices/builtin/selectors.test.ts
@@ -78,7 +78,7 @@ describe('builtinToolSelectors', () => {
});
describe('metaListIncludingHidden', () => {
- it('should keep task tools hidden from manual tool selection', () => {
+ it('should surface hidden tools so users can toggle them', () => {
const state = {
...initialState,
builtinTools: [
@@ -106,12 +106,12 @@ describe('builtinToolSelectors', () => {
const result = builtinToolSelectors.metaListIncludingHidden(state);
expect(result.map((item) => item.identifier)).toContain('tool-1');
- expect(result.map((item) => item.identifier)).not.toContain('lobe-task');
+ expect(result.map((item) => item.identifier)).toContain('lobe-task');
});
});
describe('installedAllMetaList', () => {
- it('should keep task tools out of agent profile configuration', () => {
+ it('should include all non-uninstalled tools in agent profile configuration', () => {
const state = {
...initialState,
builtinTools: [
@@ -138,7 +138,7 @@ describe('builtinToolSelectors', () => {
const result = builtinToolSelectors.installedAllMetaList(state);
- expect(result.map((item) => item.identifier)).toEqual(['tool-1']);
+ expect(result.map((item) => item.identifier)).toEqual(['lobe-task', 'tool-1']);
});
});
});
diff --git a/src/store/tool/slices/builtin/selectors.ts b/src/store/tool/slices/builtin/selectors.ts
index 908756c08ca..2fd1ec9e9a6 100644
--- a/src/store/tool/slices/builtin/selectors.ts
+++ b/src/store/tool/slices/builtin/selectors.ts
@@ -70,7 +70,6 @@ const getKlavisMetasWithAvailability = (s: ToolStoreState): LobeToolMetaWithAvai
// Set form for O(1) lookup inside the filter loop.
const RUNTIME_MANAGED_TOOL_IDS = new Set(runtimeManagedToolIds);
-const USER_HIDDEN_BUILTIN_TOOL_IDS = new Set(['lobe-task']);
/**
* Shared list builder for the chat-input Tools popover.
@@ -103,8 +102,6 @@ const buildVisibleMetaList = (
// (their enabled state is forced by AgentToolsEngine rules; user toggles would
// be a no-op and create UI/state mismatch).
if (includeHidden && RUNTIME_MANAGED_TOOL_IDS.has(item.identifier)) return false;
- // Task tools are enabled by scenario/page context and should not be user-toggleable.
- if (includeHidden && USER_HIDDEN_BUILTIN_TOOL_IDS.has(item.identifier)) return false;
// Filter platform-specific tools (e.g., LocalSystem desktop-only)
if (!isBuiltinToolAvailableInCurrentEnv(item.identifier)) return false;
@@ -192,7 +189,6 @@ const installedAllMetaList = (s: ToolStoreState): LobeToolMetaWithAvailability[]
const builtinMetas = s.builtinTools
.filter((item) => {
if (EXCLUDED_TOOLS.has(item.identifier)) return false;
- if (USER_HIDDEN_BUILTIN_TOOL_IDS.has(item.identifier)) return false;
if (uninstalledBuiltinTools.includes(item.identifier)) return false;
return true;
@@ -233,5 +229,3 @@ export const builtinToolSelectors = {
metaListIncludingHidden,
uninstalledBuiltinTools,
};
-
-export { USER_HIDDEN_BUILTIN_TOOL_IDS };