๐คฏ 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.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
๐ style(tasks): drop custom actions on result briefs & show trigger tag in subtasks (#14226)
Arvin Xuee55d74dd4be
diff --git a/packages/builtin-tool-brief/src/manifest.ts b/packages/builtin-tool-brief/src/manifest.tsindex 07fcad4f252..71cde996e25 100644--- a/packages/builtin-tool-brief/src/manifest.ts+++ b/packages/builtin-tool-brief/src/manifest.ts@@ -15,7 +15,7 @@ export const BriefManifest: BuiltinToolManifest = {properties: {actions: {description:- 'Custom action buttons for the user. If omitted, defaults are generated based on type. Each action has key (identifier), label (display text), and type ("resolve" to close, "comment" to prompt feedback).',+ 'Custom action buttons for the user. Ignored when type is "result" (result briefs render a fixed approve button). For other types, if omitted, defaults are generated based on type. Each action has key (identifier), label (display text), and type ("resolve" to close, "comment" to prompt feedback).',items: {properties: {key: { description: 'Action identifier, e.g. "approve", "split"', type: 'string' },diff --git a/packages/types/src/brief/index.ts b/packages/types/src/brief/index.tsindex fb0d69e0b31..30ad8b52f6d 100644--- a/packages/types/src/brief/index.ts+++ b/packages/types/src/brief/index.ts@@ -14,7 +14,13 @@ export interface BriefAction {url?: string;}-/** Default actions by brief type */+/**+ * Default actions by brief type.+ *+ * Note: `result` briefs intentionally have no defaults โ they are terminal and+ * render a fixed single-button UI (approve โ completes the task). Custom+ * actions on result briefs are dropped at creation time.+ */export const DEFAULT_BRIEF_ACTIONS: Record<string, BriefAction[]> = {decision: [{ key: 'approve', label: 'โ ็กฎ่ฎค', type: 'resolve' },@@ -25,10 +31,6 @@ export const DEFAULT_BRIEF_ACTIONS: Record<string, BriefAction[]> = {{ key: 'feedback', label: '๐ฌ ๅ้ฆ', type: 'comment' },],insight: [{ key: 'acknowledge', label: '๐ ็ฅๆ', type: 'resolve' }],- result: [- { key: 'approve', label: 'โ ้่ฟ', type: 'resolve' },- { key: 'feedback', label: '๐ฌ ไฟฎๆนๆ่ง', type: 'comment' },- ],};/** Brief type โ must match DEFAULT_BRIEF_ACTIONS keys and DB schema comment */diff --git a/packages/types/src/task/index.ts b/packages/types/src/task/index.tsindex d74773ba95b..8c8ba4de04f 100644--- a/packages/types/src/task/index.ts+++ b/packages/types/src/task/index.ts@@ -162,11 +162,14 @@ export interface TaskDetailSubtaskAssignee {export interface TaskDetailSubtask {assignee?: TaskDetailSubtaskAssignee | null;+ automationMode?: TaskAutomationMode | null;blockedBy?: string;children?: TaskDetailSubtask[];+ heartbeat?: { interval?: number | null };identifier: string;name?: string | null;priority?: number | null;+ schedule?: { pattern?: string | null; timezone?: string | null };status: string;}diff --git a/src/features/AgentTasks/AgentTaskDetail/TaskSubtasks.tsx b/src/features/AgentTasks/AgentTaskDetail/TaskSubtasks.tsxindex 4560df7d996..f68cb3564ff 100644--- a/src/features/AgentTasks/AgentTaskDetail/TaskSubtasks.tsx+++ b/src/features/AgentTasks/AgentTaskDetail/TaskSubtasks.tsx@@ -17,6 +17,7 @@ import AssigneeAvatar from '../features/AssigneeAvatar';import TaskPriorityTag from '../features/TaskPriorityTag';import TaskStatusTag from '../features/TaskStatusTag';import TaskSubtaskProgressTag from '../features/TaskSubtaskProgressTag';+import TaskTriggerTag from '../features/TaskTriggerTag';import { useTaskItemContextMenu } from '../features/useTaskItemContextMenu';import { styles } from '../shared/style';@@ -88,6 +89,7 @@ const SubtaskTitle = memo<{ task: TaskDetailSubtask }>(({ task }) => {horizontalalign="center"gap={8}+ justify="space-between"style={{ lineHeight: 1, minWidth: 0, overflow: 'hidden', width: '100%' }}><span@@ -105,6 +107,18 @@ const SubtaskTitle = memo<{ task: TaskDetailSubtask }>(({ task }) => {<Text ellipsis fontSize={13} style={{ flex: 1, minWidth: 0 }}>{task.name || task.identifier}</Text>+ {task.automationMode ? (+ <span+ style={{ alignItems: 'center', display: 'inline-flex', flex: 'none' }}+ onClick={(e) => e.stopPropagation()}+ >+ <TaskTriggerTag+ heartbeatInterval={task.heartbeat?.interval}+ schedulePattern={task.schedule?.pattern}+ scheduleTimezone={task.schedule?.timezone}+ />+ </span>+ ) : null}<AssigneeAgentSelectorcurrentAgentId={task.assignee?.id ?? null}disabled={isRunning}diff --git a/src/features/AgentTasks/shared/style.ts b/src/features/AgentTasks/shared/style.tsindex 29300ffb83b..21ec92bde65 100644--- a/src/features/AgentTasks/shared/style.ts+++ b/src/features/AgentTasks/shared/style.ts@@ -61,14 +61,22 @@ export const styles = createStaticStyles(({ css, cssVar }) => ({overflow: hidden;display: flex;+ flex: 1;gap: 4px;align-items: center;+ min-width: 0;min-height: 36px;color: ${cssVar.colorTextSecondary};}+ .ant-tree-title {+ overflow: hidden;+ flex: 1;+ min-width: 0;+ }+.ant-tree-switcher {margin-inline-end: 0;color: ${cssVar.colorTextDescription};diff --git a/src/features/Conversation/ChatInput/QueueTray.tsx b/src/features/Conversation/ChatInput/QueueTray.tsxindex c662532697f..b5652c504d0 100644--- a/src/features/Conversation/ChatInput/QueueTray.tsx+++ b/src/features/Conversation/ChatInput/QueueTray.tsx@@ -2,7 +2,7 @@import { ActionIcon, Flexbox, Icon } from '@lobehub/ui';import { createStaticStyles } from 'antd-style';-import { ListEnd, Pencil, SendHorizontal, Trash2 } from 'lucide-react';+import { ArrowUp, ListEnd, Pencil, Trash2 } from 'lucide-react';import { memo, useCallback, useMemo } from 'react';import { useTranslation } from 'react-i18next';@@ -124,7 +124,7 @@ const QueueTray = memo(() => {onClick={() => handleEdit(msg.id, msg.content)}/><ActionIcon- icon={SendHorizontal}+ icon={ArrowUp}size="small"title={t('inputQueue.sendNow')}onClick={() => handleSendNow(msg)}diff --git a/src/server/services/task/index.ts b/src/server/services/task/index.tsindex 620ce213669..e4b1bfface9 100644--- a/src/server/services/task/index.ts+++ b/src/server/services/task/index.ts@@ -117,11 +117,16 @@ export class TaskService {},}: {}),+ automationMode: s.automationMode,blockedBy: depMap.get(s.id),children: buildSubtaskTree(s.id),+ ...(s.heartbeatInterval != null ? { heartbeat: { interval: s.heartbeatInterval } } : {}),identifier: s.identifier,name: s.name,priority: s.priority,+ ...(s.schedulePattern || s.scheduleTimezone+ ? { schedule: { pattern: s.schedulePattern, timezone: s.scheduleTimezone } }+ : {}),status: s.status,};});diff --git a/src/server/services/taskLifecycle/index.ts b/src/server/services/taskLifecycle/index.tsindex fc01d688e97..3cefcff14fc 100644--- a/src/server/services/taskLifecycle/index.ts+++ b/src/server/services/taskLifecycle/index.ts@@ -354,13 +354,9 @@ export class TaskLifecycleService {// Max iterations reached โ surface the (failed) result for human accept/retry.// Type is `result` so the user's `approve` action is treated as a terminal- // accept signal (force-pass) by BriefService.resolve.+ // accept signal (force-pass) by BriefService.resolve. Result briefs render+ // a fixed single-button UI, so no custom actions are persisted.await this.briefModel.create({- actions: [- { key: 'retry', label: '๐ ้่ฏ', type: 'resolve' as const },- { key: 'approve', label: 'โ ๅผบๅถ้่ฟ', type: 'resolve' as const },- { key: 'feedback', label: '๐ฌ ไฟฎๆนๆ่ง', type: 'comment' as const },- ],priority: 'urgent',summary: `Review failed after ${iteration} iteration(s) (score: ${reviewResult.overallScore}%). Suggestions: ${reviewResult.suggestions?.join('; ') || 'none'}`,taskId,diff --git a/src/server/services/toolExecution/serverRuntimes/brief.ts b/src/server/services/toolExecution/serverRuntimes/brief.tsindex f754c9b7380..50a2dd53634 100644--- a/src/server/services/toolExecution/serverRuntimes/brief.ts+++ b/src/server/services/toolExecution/serverRuntimes/brief.ts@@ -23,7 +23,11 @@ const createBriefRuntime = ({title: string;type: string;}) => {- const actions = args.actions || DEFAULT_BRIEF_ACTIONS[args.type] || [];+ // 'result' briefs are terminal โ the UI hardcodes a single approve action+ // and routes it through BriefService.resolve to complete the task. Custom+ // actions on result briefs would be ignored, so reject them at the source.+ const actions =+ args.type === 'result' ? null : args.actions || DEFAULT_BRIEF_ACTIONS[args.type] || [];const brief = await briefModel.create({actions,