文件最后提交记录最后更新时间
🐛 fix(casc): replace new Function() template with safe string builders (#14751) * 🐛 fix(casc): replace new Function()-based template with safe string builders and self-fetching ChangelogModal - Remove es-toolkit/compat template (uses new Function()) from ShareModal, ShareMessageModal, and parserPlaceholder; replace with plain string building and String.replace - ChangelogModal now self-fetches latest changelog id via lambdaClient instead of relying on async server component wrapper; setTimeout starts after data arrives - Remove ChangelogService/gray-matter import from route component * 🐛 fix(casc): add missing deps to changelog timer effect10 天前
✨ feat: support chat mode and redesign chat input action bar (#14774) * Refine chat parameter controls and working sidebar * 💄 style: refine chat parameter controls * 💄 style: refine chat input action affordances * 💄 style: refine chat input control menus * 💄 style: refine chat input skills menu * 🐛 fix: replace skills policy dropdown with popover * fix: base-ui dropdown * fix: base-ui dropdown * 💄 style: fix popover conflict and refine skills menu layout - Extract PopoverLabel component with controlled open state to prevent conflict when skill policy menu opens - Dispatch custom close event so detail popovers close before policy popover opens - Add divider between pinned and auto skill groups - Refine sticky search/footer padding via CSS attribute selectors - Remove stray console.log from ActionDropdown Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * 💄 style: refine skills policy menu and chat input UI - Skills policy menu: change active icon color to blue, add divider + uninstall action for Klavis/MCP/agent-skill items, suppress detail popover when the "..." policy menu is open - Minor refinements across ChatInput, Conversation Error/ContentLoading, and HeterogeneousAgent StatusGuide components Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat: add custom MCP tag and configure action to skills menu - Show orange "Custom" tag next to custom MCP plugin entries - Add Configure action above Uninstall in the policy popover that opens the PluginDevModal drawer for editing the custom plugin Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat: default agent mode to true and gate chat mode at the tools engine - Move `enableAgentMode` from `LobeAgentConfig` to `LobeAgentChatConfig` so it persists via the existing `chat_config` jsonb column and is readable on the server (the top-level field was silently dropped by drizzle). - Default to agent mode for all agents — selectors treat `undefined` as `true`; only an explicit `false` collapses to chat mode. - Introduce `chatModeAllowedToolIds = [knowledge-base, memory, web-browsing]`. Both `createServerAgentToolsEngine` and the frontend `createAgentToolsEngine` now switch on this whitelist in chat mode: skip user plugins, skip `alwaysOnToolIds`, narrow `defaultToolIds`, and turn off `allowExplicitActivation` so the activator can't smuggle other tools in. - `useToggleAgentMode` is the single mode-switch entry; `plugins[]` is left alone — chat mode is enforced at runtime, not by mutating saved config. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat: extend topic status with running/paused/failed Widen `ChatTopicStatus` enum (DB schema, types, TRPC validation) to cover the in-flight lifecycle that gateway and heterogeneous executor runs report. Add a `updateTopicStatus` store action and have both runtime paths write `running` on start and `active` on completion (or `failed` on terminal error). Sidebar topic items render a spinner while `status === 'running'`. Note: drizzle migration for the widened enum needs to be generated separately. * 💄 style: polish skills menu — official tag, tooltip on settings button Add a LobeHub "official" badge to builtin tools and agent skills surfaced in the Skills menu. Wrap the menu's settings button in a Tooltip. Scope the group-header padding reset to the skill-activation group only so the Knowledge submenu keeps its native section padding. * ✨ feat: mark topic as paused while awaiting human tool approval Extend the heterogeneous-agent topic status machine (c0170d032f) with a paused state. The gateway event handler writes topic.status = 'paused' on step_start { phase: 'human_approval' } — one hook covers both Gateway and desktop heterogeneous paths since they share the same handler. Resume back to 'running' is free: approve / reject_continue both spawn a fresh op via the executor entries, which already persist 'running'. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat: gate skills and agent-document injectors at the context engine in chat mode Thread `enableAgentMode` into `MessagesEngine`. When it is explicitly `false`, the engine forces `enabled: false` on: - SkillContextProvider — drops the <available_skills> block - All AgentDocument injectors (BeforeSystem / SystemAppend / SystemReplace / Context / Message) — drops every agent-document position The frontend (`src/services/chat/mecha/contextEngineering.ts`) and server (`src/server/modules/AgentRuntime/RuntimeExecutors.ts` → `serverMessagesEngine`) read `chatConfig.enableAgentMode` from agent config and pass it through; no caller needs to know which injectors to skip. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat: also gate agent-management context in chat mode `agentManagementContext` (the `<current_agent>` + `<available_agents>` block) was leaking into chat-mode prompts whenever the agent was in auto-skill mode, because its caller-side guard (`isInAutoSkillMode || isAgentManagementEnabled`) is orthogonal to `enableAgentMode`. Fold the gate into the same `isAgentMode` switch already covering skills + agent documents in `MessagesEngine` so the injector goes off in chat mode regardless of how the caller populates the context. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 🐛 fix: drop orphan rebase marker in OperationTraceRecorder Leftover `<<<<<<< HEAD` from an earlier rebase that was only half cleaned — the HEAD-side content is the one we want; just delete the marker line so the file type-checks again. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: cursor-style action bar on home input Rework the home ChatInput footer to read like Cursor's composer while keeping the model picker on the right: - Replace the `agentMode` icon-only button with a pill trigger (icon + label + chevron) carrying a persistent fill, dropping a `bottomLeft` mode popover. Reuses the `RuntimeConfig/ModeSelector` design in place so any other action bar consumer picks it up automatically. - Introduce a `modelLabel` action that shows the resolved model display name + chevron, opening `ModelSwitchPanel`. The original `model` icon stays untouched for callers that prefer the compact form. - Wire the home input to use ['agentMode','plus'] on the left and ['modelLabel'] on the right; bump `SendArea` gap to 12 and add `paddingLeft={6}` to the action bar so the pill aligns with the input placeholder. - Localize `chatMode.chat` to "对话" in zh-CN (default English stays "Chat"). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: surface params panel toggle and hide it for heterogeneous agents - Drop the developer-mode gate on the conversation header params toggle so it ships by default; popup routes remain excluded. - Hide both the header toggle and the right sidebar `Params` tab for heterogeneous agents (Claude Code / Codex etc.), since their model params panel doesn't apply. The active-tab resolver also falls back away from `params` when it isn't available. - Strengthen the Tools popover divider to `colorFill` so the header / footer separators stay visible against the elevated dark-mode surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 🚑 fix: address type errors surfaced on the new-input branch - Move the `border` from the removed `overlayInnerStyle` onto `styles.content` so the AgentMode / ModeSelector popovers compile against the base-ui `PopoverProps` shape. - Pass `paddingLeft: 6` through `style` on `ChatInputActions` since the underlying Flexbox only accepts `padding` / `paddingBlock` / `paddingInline`. - Tighten skill / market menu items: drop the unsupported `closeOnClick` from the group item, fallback the uninstall display name to `identifier`, swap the antd-style `type: 'warning'` confirm option for `okButtonProps.danger`, and assert the conditionally-spread market items as `ItemType` so the inferred union no longer contains `undefined`. - Annotate `resolveMark` in `LevelSlider` so the fallback branch returns a `ReactNode` label, fixing the `MarkObj` mismatch on `LevelOption`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Innei <tukon479@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>9 天前
chore: fix lint 3 个月前
✨ feat: implement server data feature 4 个月前
✨ feat: implement server data feature 4 个月前
♻️ refactor: remove deperated code (#10001) * remove * improve * remove chatModels * remove user model list slice * improve lab image * remove deprecated code * remove clerk_sign_up * fix tests6 个月前
🔨 chore: premerge Task detail page UI (#13653) * ✨ feat: add AgentTaskList component on agent welcome page (LOBE-6597) - AgentTaskList with TaskListHeader, TaskItem, and styles - Embedded in AgentWelcome below ToolAuthAlert - Each task rendered as independent rounded card with status badge - Status: green filled circle (Done), blue circle (In progress) - Card width matches chat input (960px) - i18n keys for taskList.title and taskList.viewAll - Fix updateReview type to use TRPC-inferred type Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add Tasks page at /agent/:aid/tasks with route, breadcrumb, and view toggle (LOBE-6597) - Register tasks route in both desktopRouter.config.tsx and .desktop.tsx - Thin route page at src/routes/(main)/agent/tasks/index.tsx - Feature components in src/features/AgentTasks/: page, breadcrumb, header with list/kanban toggle, full task list - Wire up "View All Tasks" navigation from AgentTaskList welcome card - Add i18n keys (taskList.activeTasks, taskList.breadcrumb.task) and generate translations via pnpm i18n Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add Task detail page at /agent/:aid/tasks/:taskId (LOBE-6597) - Register :taskId child route in both desktopRouter configs - TaskDetailPage with auto-save hint, breadcrumb, and scrollable content - TaskDetailHeader: editable title (borderless Input), Run/Pause button, status/priority tags, delete - TaskInstruction: click-to-edit Markdown with debounced auto-save - TaskSubtasks: sub-issues list with status badges - TaskActivities: timeline with topic/brief/comment icons - TaskItem now navigates to detail page instead of just setting activeTaskId - Add taskDetail.* i18n keys with generated translations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add TaskModelConfig, TaskScheduleConfig, and refine Task detail UI (LOBE-6597) Add model/provider selector and periodic execution config to Task detail page. Refine TaskDetailHeader, TaskInstruction with auto-save and i18n support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: refine Task detail UI with Linear-style design (LOBE-6597) - Redesign SubTasks with collapsible header, progress circle, hover + click navigation - Redesign Activities with agent avatar, comment input box, and Linear-style layout - Add TaskParentBar showing parent task relationship with sibling navigation popover - Add delete confirmation modal using App.useApp().modal.confirm - Move ModelSelect to separate row below action bar - Fix zustand selector recreation in ActivityItem - Replace hardcoded colors with cssVar tokens Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add Properties panel, parent link hover, activity icon, and lifecycle save status (LOBE-6597) - Add TaskProperties sidebar with collapsible status/priority dropdowns - Parent bar: clickable parent link with hover, sibling navigation popover on progress - Activity title: add BotMessageSquare icon - Fix lifecycle actions not updating taskSaveStatus (saving/saved indicator) - Filter status dropdown to only user-selectable states (backlog/completed/canceled) - Add test task creation script for dev Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add recursive tree view for subtasks with Linear-style connecting lines (LOBE-6597) - Add buildTaskTree utility to convert flat getTaskTree API response into nested tree - Implement SubtaskTreeItem recursive component with CSS connecting lines (├─ and └─) - Fetch full task tree via taskService.getTaskTree for nested subtask display - Show loading spinner during tree fetch, fallback to flat list on error - Remove padding-inline from AgentTaskList container Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: address PR review — delete redirect, debounce cleanup, schedule resync (LOBE-6597) - Redirect to task list after successful delete (P1) - Clean up instruction debounce timer on unmount/task switch to prevent stale writes (P1) - Resync TaskScheduleConfig local state when active task changes (P2) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: use backend nested subtasks directly, remove buildTaskTree (LOBE-6597) Backend now returns nested subtasks in task.detail (LOBE-6814). Remove buildTaskTree utility, getTaskTree API call, and loading state. Use TaskDetailSubtask from @lobechat/types instead of local interface. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ⚡ perf: add optimistic update and save status for model config change (LOBE-6597) updateTaskModelConfig now immediately reflects new model/provider in UI via optimistic store dispatch, and tracks taskSaveStatus (saving/saved). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ⚡ perf: skip redundant refreshTaskDetail on successful model config update (LOBE-6597) Optimistic update is trusted on success — no need for full detail re-fetch. Aligns with updateTask pattern. Refresh kept only in error path for revert. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: use backend author info for activities, fix AgentTaskList after AgentHome refactor (LOBE-6597) - Activity: use act.author (TaskDetailActivityAuthor) from backend instead of agentMap lookup (LOBE-7013) - AgentTaskList: fix agentId from useParams instead of useAgentStore.activeAgentId (was undefined) - AgentHome: integrate AgentTaskList into new AgentHome layout (replaces old AgentWelcome) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: show participant avatars on task cards, use backend author for activities (LOBE-6597) - TaskItem: display up to 3 participant avatars next to task title (LOBE-6805) - Activity: use act.author from backend instead of agentMap lookup (LOBE-7013) - AgentHome: integrate AgentTaskList into new AgentHome layout - Revert AgentTaskList/TaskItem agentId back to useAgentStore (works correctly when mounted) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: fix type safety, memoize participants filter, extract avatar styles (LOBE-6597) - Use TaskParticipant type instead of `any` in filter/map - Compute displayParticipants once with useMemo (was filtering twice per render) - Move avatar overlap styles to CSS classes (was inline objects per render) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🔇 chore: hide kanban view toggle until implemented (LOBE-6597) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: export TaskStatus/TaskPriority/TaskActivityType from @lobechat/types (LOBE-6597) Replace hardcoded string/number types with shared type aliases: - TaskStatus: 'backlog' | 'canceled' | 'completed' | 'failed' | 'paused' | 'running' - TaskPriority: 0 | 1 | 2 | 3 | 4 - TaskActivityType: 'brief' | 'comment' | 'topic' Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * style: update * style: update * style: update * style: update * style: update * style: update * style: update * style: update * style: update * style: update * ✨ feat: add Daily Brief module to homepage (#13851) * ✨ feat: add Daily Brief module to homepage Add a Daily Brief section below the chat input on the homepage that displays unresolved briefs from the Agent Tasks system. Users can resolve, comment, and provide feedback directly from the brief cards. - Service: BriefService with listUnresolved, resolve, markRead, addComment - Store: Independent Zustand store (src/store/brief/) with SWR data fetching - Components: BriefCard, BriefCardActions (dynamic action buttons), BriefCardSummary (Markdown with expand/collapse), CommentInput (@lobehub/editor) - Three action types: resolve (closes brief), comment (resolve with text), link (safe URL navigation with protocol validation) - Fixed feedback button: adds task comment without resolving the brief - Inline success state ("Feedback sent") with 1.5s auto-restore - i18n: zh-CN + en-US translations - Tests: 21 tests across service, store selectors, and components - CLI: Register task and brief commands for local development Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add agent avatars to Daily Brief cards Display stacked agent avatars next to brief card titles using the new `agents` data from Arvin's enriched listUnresolved API (#13489). - Add AgentAvatarInfo type and agents field to BriefItem - Render overlapping circular avatars (20px, -6px overlap) - Use cssVar.colorBgContainer for border (dark mode compatible) - Extract avatar style to function to avoid inline object creation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: clean up Daily Brief components - Extract duplicate success state JSX into reusable SuccessTag component - Remove redundant comments that describe what code does - Use DEFAULT_AVATAR from @lobechat/const instead of hardcoded emoji Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: address PR review feedback for Daily Brief - Use cssVar.colorBgBase instead of hardcoded #fff for primary button text color (dark mode contrast fix) - Add submitting state to CommentInput to prevent duplicate submissions (disable buttons + show loading during async submit) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🌐 chore: generate i18n translations for Daily Brief Run pnpm i18n to generate translations for all 18 locales. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: use shared BriefType from @lobechat/types Export BriefType union from packages/types and use it in BRIEF_TYPE_COLOR and BRIEF_TYPE_ICON records for compile-time key validation. Adding a new brief type now requires updating the shared type, and TypeScript will flag missing mappings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * style: update * style: update * style: update --------- Co-authored-by: Tsuki <976499226@qq.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * style: update * style: update * style: update * style: update * fix: stopPropagation * fix: i18n * 🐛 fix: wire comment inputs to editor instance so Send actually submits CommentInput in AgentTasks and DailyBrief used antd TextArea inside @lobehub/editor's ChatInput while reading content via editor.getDocument('markdown'). The TextArea was never connected to the editor instance, so getDocument always returned empty and handleSubmit short-circuited silently — Send appeared to do nothing (no network request fired). Replace the TextArea with <Editor editor={editor} type="text" variant="chat" /> so useEditor() actually drives the editable surface. Keep plain-text behavior via markdownOption={false} + enablePasteMarkdown={false}, and bind Cmd/Ctrl+Enter submit via onPressEnter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: use participant.title after TaskParticipant schema rename (#13877) PR #13877 renamed TaskParticipant.name → .title and added .backgroundColor. Our branch's UI code (AgentAvatars, listViewOptions, TaskList group header, Breadcrumb) was already written against the new schema, but TaskProperties still read firstParticipant?.name — update the last remaining call site so the type matches post-rebase. backgroundColor is already plumbed through everywhere it applies within #13877's scope; TaskActivities' TaskDetailActivityAuthor is a separate type untouched by the PR and kept as-is. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: resolve type-check errors exposed after canary rebase canary upgraded react-i18next to a version with typed i18n keys and tightened @lobehub/editor's SendButton + IEditor APIs. Rebase pulled these in, surfacing latent type errors in LOBE-6597 code. - CommentInput: use editor.cleanDocument() (IEditor's actual API; clearContent never existed). - TaskActivities / TaskLatestActivity / TaskTriggerTag: type t as TFunction<'chat'> so typed i18n accepts the known-literal keys used inside module-level helpers. - TaskPriorityTag / TaskStatusTag / listViewOptions: add defaultValue: '' to dynamic-key t() calls (template literals and Record lookups) to match the broad-key i18n overload. - BriefCardActions: swap unusable <SendButton> (no children, no iconPlacement) for <Button>; add defaultValue to the dynamic brief-action key lookup; drop stale @ts-ignore. - DailyBrief/CommentInput: drop unsupported children on SendButton; keep label via title attribute. - Recents/Item: type TYPE_ICON_MAP as Partial<Record<...>> so 'task' (rendered via TaskStatusIcon elsewhere) is a safe absent key. - brief/slices/list/action: cast briefService.listUnresolved() result back to BriefItem[] (TRPC serialization widens BriefType to string). - AgentTasks/TasksHeader: delete dead file — no importers and its ./style module was removed by an earlier refactor. Also ran pnpm install to materialize the newly-extracted @lobechat/agent-gateway-client workspace package (canary #13866), clearing ~7 "cannot find module" errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor(builtin-tool-task): polish task tool paths (#13869) * ✨ feat: navigate to task detail when clicking brief card header Clicking the header row of a Daily Brief card (icon + title + time + agent avatars) now jumps straight to the associated task, using the brief's task-tree agent (with activeAgent / inbox as fallback). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: show parent task ids as clickable breadcrumb trail Walk the cached parent chain from taskDetailMap and insert each ancestor's identifier as a link between the "任务" entry and the current task name in the task detail breadcrumb. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add cross-agent /tasks page with View All Tasks on Daily Brief - Register `/tasks` route in desktop (web + Electron) and mobile router configs - `useFetchTaskList` supports `allAgents` mode via options object API to fetch tasks without agent filter; backend already supports optional assigneeAgentId - `Breadcrumb` accepts optional `agentId`, renders "All tasks" crumb when absent - `AgentTaskItem` navigation uses `task.assigneeAgentId` so clicks work from the cross-agent page (falls back to `activeAgentId` for unassigned tasks) - Extract `useScenarioEnabledTools` hook to share layout effect between `/tasks/_layout` and `/agent/:aid/tasks/_layout` Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: use assigneeAgentId for task avatar instead of participants array Replace AgentAvatars (took participants[]) with AssigneeAvatar (takes agentId, resolves meta from agent store). This correctly represents that a task is assigned to a single agent via assigneeAgentId/detail.agentId. - New AssigneeAvatar component reads agent meta from agent store by ID - TaskProperties reads activeTaskAgentId from task detail store - listViewOptions uses task.assigneeAgentId directly for groupBy/sort - Extract shared isInboxAgentId helper to eliminate 4x inline duplication - Group headers resolve agent title at render time via AssigneeLabel component Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: enable vertical scrolling on cross-agent tasks page Add overflowY and flex to WideScreenContainer wrapper so the task list can scroll when content exceeds viewport height. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add re-assign task agent with popover selector - Add AssigneeAgentSelector component with Popover agent list - Extract useAgentDisplayMeta hook for consistent agent name/avatar resolution - Fix optimistic update mapping assigneeAgentId → agentId in task store - Disable reassignment for running tasks with tooltip hint - Integrate selector into task list and task detail property panel Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: reuse BriefCard in task detail activities & fix raw-id navigation Render brief-type activities as full BriefCard (same as homepage) instead of plain tree rows. Decouple BriefCardActions from useBriefStore for actions lookup so it can be reused across pages. Fix infinite loading when navigating to task detail via raw DB id (task_xxx) by storing detail under both the identifier and the raw id key in taskDetailMap. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add TopicCard component for task detail activities Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: allow re-running completed tasks with dedicated button Completed tasks now show a "Re-run" button (with rotate icon) instead of hiding the action. The backend already supported this — only the frontend selector gate needed updating. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add create task modal with markdown editor Add a "+" button on the tasks list page that opens a Linear-style modal for manually creating tasks. The modal features a title input, a markdown editor (EditorCanvas), and a bottom toolbar with priority and assignee selectors. Existing tag components (TaskStatusTag, TaskPriorityTag, AssigneeAgentSelector) are extended with an `onChange` controlled mode so they can be used in creation context where no task exists yet. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: suppress spurious updateTask on Task Detail page load EditorDataMode was missing the contentChangeLockRef pattern that DocumentIdMode already uses, causing Lexical's registerUpdateListener to treat programmatic content hydration as a user edit and fire onContentChange → updateTask on every page visit. - Add contentChangeLockRef + lockIdRef staleness guard - Extract loadContentWithLock to deduplicate lock/load/unlock logic - Pass contentChangeLockRef to InternalEditor - Remove unreachable dead code in loadEditorContent Closes LOBE-7362 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: task detail comment CRUD and various UX improvements Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 🐛 fix: move canceled status group to the end of task list Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: polish task detail layout, title, and run button - Title switched to auto-sizing TextArea so long names wrap (like Linear) - Reduce title font-size from 32px to 24px and tighten paddings - Make "运行任务" button small-sized to match the denser header - Add 120px bottom padding for end-of-content scroll breathing room - Default EditorCanvas paddingBottom trimmed from 64 to 32 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: refine task assignee, priority, and comment input - Assignee block uses filled variant in dark mode for better contrast - Urgent priority (level 1) renders in orange for quick scanning - Comment input keeps SendButton slot reserved to prevent layout shift Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat: task detail — inline subtasks, automation mode, chronological activity - Inline subtask creation under a task via CreateTaskInlineEntry (parentTaskId/autoFocus/onCollapse/placeholder), refreshes parent on create - Track agent-created tasks via createdByAgentId through service, router, types, and the builtin task executor - Replace scheduler Segmented-only UI with an Enable switch + heartbeat/ schedule mode; persist via automationMode on the task - Sort detail activities oldest → newest for a natural timeline reading - Reducer patches nested subtask entries on updateTaskDetail so in-place edits reflect in the parent's subtask tree Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: render activate-tool chips as rounded pills Switch inspector tool chips from monospace code tags to filled rounded pills with ellipsis overflow, making multi-tool rows scan better in tight headers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 🐛 fix: keep finished tool call out of loading state while siblings run The message-level isAssistantMessageBusy flag stays true while sibling tool calls are still running. Without guarding on this tool's own result, a finished tool would flip back to "loading". Now a tool that has a real result or error is never shown as calling. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: use small Segmented in schedule config popover Keeps the automation mode switcher visually aligned with the denser popover controls. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat: agent profile hover card on task activity author - Extract shared AgentProfileCard + unified AgentProfilePopup (click / hover) with lazy agent fetch; move out of group sidebar path. - Wire activity author avatar + name to a hover card; brighten title on hover; keep a small "agent" tag on the author row. - Show inline skeletons (description + footer stats) while loading. - Enrich subtask payload with assignee agent info for cleaner UI. * ✨ feat: open task topic chat in side drawer Click a topic row in the task detail activities to open a right-side drawer showing the topic's full chat history. Messages stream in live via the existing agent gateway pipeline (gateway events land in chatStore.dbMessagesMap keyed by the topic context), so a running topic refreshes its drawer in real time without a dedicated subscription. Reuses the Conversation feature (ConversationProvider + ChatList) with an isolated context (agentId + topicId + isolatedTopic), so the drawer never touches the global active topic and multiple panels coexist cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: outline activate-tool chip with subtle border Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat: show topic handoff summary on activity card Pull `handoff.summary` through the task service into TaskDetailActivity and render it under the title in TopicCard so completed topics surface what was accomplished without opening the drawer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 🎸 chore: gate agent task feature behind agent_task flag Hide every client-side entry point to the Agent Task feature when the `agent_task` flag (default `isDev`, off in prod) is disabled: - Sidebar: task tab in the agent sidebar nav - Routes: `/agent/:aid/tasks/*` and `/tasks/*` layouts redirect to `/` when the flag is off (mobile router reuses the same layout) - Home Recents: filter out `type='task'` items in both the list and the "all recents" drawer - Daily Brief: skip fetch + hide the entire panel (all briefs link to tasks) Backend TRPC / lifecycle stays on — the feature is already live for CLI usage. Flag name mirrors `agent_onboarding` for consistency. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 🐛 fix: prioritize includeTriggers in topic queries * 🐛 fix: normalize task detail activity payloads * ✨ feat: add Kanban board view for task list with drag-and-drop LOBE-7493 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 💄 style: shorten schedule tag labels & fix time width in task cards Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * update i18n * 💄 style: hide task tool from user selectors * 💄 style: hide task skill from user selectors --------- Co-authored-by: canisminor1990 <i@canisminor.cc> Co-authored-by: YuTengjing <ytj2713151713@gmail.com> Co-authored-by: Arvin Xu <arvinx@foxmail.com>1 个月前
🔨 chore: premerge Task detail page UI (#13653) * ✨ feat: add AgentTaskList component on agent welcome page (LOBE-6597) - AgentTaskList with TaskListHeader, TaskItem, and styles - Embedded in AgentWelcome below ToolAuthAlert - Each task rendered as independent rounded card with status badge - Status: green filled circle (Done), blue circle (In progress) - Card width matches chat input (960px) - i18n keys for taskList.title and taskList.viewAll - Fix updateReview type to use TRPC-inferred type Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add Tasks page at /agent/:aid/tasks with route, breadcrumb, and view toggle (LOBE-6597) - Register tasks route in both desktopRouter.config.tsx and .desktop.tsx - Thin route page at src/routes/(main)/agent/tasks/index.tsx - Feature components in src/features/AgentTasks/: page, breadcrumb, header with list/kanban toggle, full task list - Wire up "View All Tasks" navigation from AgentTaskList welcome card - Add i18n keys (taskList.activeTasks, taskList.breadcrumb.task) and generate translations via pnpm i18n Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add Task detail page at /agent/:aid/tasks/:taskId (LOBE-6597) - Register :taskId child route in both desktopRouter configs - TaskDetailPage with auto-save hint, breadcrumb, and scrollable content - TaskDetailHeader: editable title (borderless Input), Run/Pause button, status/priority tags, delete - TaskInstruction: click-to-edit Markdown with debounced auto-save - TaskSubtasks: sub-issues list with status badges - TaskActivities: timeline with topic/brief/comment icons - TaskItem now navigates to detail page instead of just setting activeTaskId - Add taskDetail.* i18n keys with generated translations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add TaskModelConfig, TaskScheduleConfig, and refine Task detail UI (LOBE-6597) Add model/provider selector and periodic execution config to Task detail page. Refine TaskDetailHeader, TaskInstruction with auto-save and i18n support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: refine Task detail UI with Linear-style design (LOBE-6597) - Redesign SubTasks with collapsible header, progress circle, hover + click navigation - Redesign Activities with agent avatar, comment input box, and Linear-style layout - Add TaskParentBar showing parent task relationship with sibling navigation popover - Add delete confirmation modal using App.useApp().modal.confirm - Move ModelSelect to separate row below action bar - Fix zustand selector recreation in ActivityItem - Replace hardcoded colors with cssVar tokens Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add Properties panel, parent link hover, activity icon, and lifecycle save status (LOBE-6597) - Add TaskProperties sidebar with collapsible status/priority dropdowns - Parent bar: clickable parent link with hover, sibling navigation popover on progress - Activity title: add BotMessageSquare icon - Fix lifecycle actions not updating taskSaveStatus (saving/saved indicator) - Filter status dropdown to only user-selectable states (backlog/completed/canceled) - Add test task creation script for dev Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add recursive tree view for subtasks with Linear-style connecting lines (LOBE-6597) - Add buildTaskTree utility to convert flat getTaskTree API response into nested tree - Implement SubtaskTreeItem recursive component with CSS connecting lines (├─ and └─) - Fetch full task tree via taskService.getTaskTree for nested subtask display - Show loading spinner during tree fetch, fallback to flat list on error - Remove padding-inline from AgentTaskList container Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: address PR review — delete redirect, debounce cleanup, schedule resync (LOBE-6597) - Redirect to task list after successful delete (P1) - Clean up instruction debounce timer on unmount/task switch to prevent stale writes (P1) - Resync TaskScheduleConfig local state when active task changes (P2) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: use backend nested subtasks directly, remove buildTaskTree (LOBE-6597) Backend now returns nested subtasks in task.detail (LOBE-6814). Remove buildTaskTree utility, getTaskTree API call, and loading state. Use TaskDetailSubtask from @lobechat/types instead of local interface. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ⚡ perf: add optimistic update and save status for model config change (LOBE-6597) updateTaskModelConfig now immediately reflects new model/provider in UI via optimistic store dispatch, and tracks taskSaveStatus (saving/saved). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ⚡ perf: skip redundant refreshTaskDetail on successful model config update (LOBE-6597) Optimistic update is trusted on success — no need for full detail re-fetch. Aligns with updateTask pattern. Refresh kept only in error path for revert. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: use backend author info for activities, fix AgentTaskList after AgentHome refactor (LOBE-6597) - Activity: use act.author (TaskDetailActivityAuthor) from backend instead of agentMap lookup (LOBE-7013) - AgentTaskList: fix agentId from useParams instead of useAgentStore.activeAgentId (was undefined) - AgentHome: integrate AgentTaskList into new AgentHome layout (replaces old AgentWelcome) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: show participant avatars on task cards, use backend author for activities (LOBE-6597) - TaskItem: display up to 3 participant avatars next to task title (LOBE-6805) - Activity: use act.author from backend instead of agentMap lookup (LOBE-7013) - AgentHome: integrate AgentTaskList into new AgentHome layout - Revert AgentTaskList/TaskItem agentId back to useAgentStore (works correctly when mounted) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: fix type safety, memoize participants filter, extract avatar styles (LOBE-6597) - Use TaskParticipant type instead of `any` in filter/map - Compute displayParticipants once with useMemo (was filtering twice per render) - Move avatar overlap styles to CSS classes (was inline objects per render) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🔇 chore: hide kanban view toggle until implemented (LOBE-6597) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: export TaskStatus/TaskPriority/TaskActivityType from @lobechat/types (LOBE-6597) Replace hardcoded string/number types with shared type aliases: - TaskStatus: 'backlog' | 'canceled' | 'completed' | 'failed' | 'paused' | 'running' - TaskPriority: 0 | 1 | 2 | 3 | 4 - TaskActivityType: 'brief' | 'comment' | 'topic' Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * style: update * style: update * style: update * style: update * style: update * style: update * style: update * style: update * style: update * style: update * ✨ feat: add Daily Brief module to homepage (#13851) * ✨ feat: add Daily Brief module to homepage Add a Daily Brief section below the chat input on the homepage that displays unresolved briefs from the Agent Tasks system. Users can resolve, comment, and provide feedback directly from the brief cards. - Service: BriefService with listUnresolved, resolve, markRead, addComment - Store: Independent Zustand store (src/store/brief/) with SWR data fetching - Components: BriefCard, BriefCardActions (dynamic action buttons), BriefCardSummary (Markdown with expand/collapse), CommentInput (@lobehub/editor) - Three action types: resolve (closes brief), comment (resolve with text), link (safe URL navigation with protocol validation) - Fixed feedback button: adds task comment without resolving the brief - Inline success state ("Feedback sent") with 1.5s auto-restore - i18n: zh-CN + en-US translations - Tests: 21 tests across service, store selectors, and components - CLI: Register task and brief commands for local development Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add agent avatars to Daily Brief cards Display stacked agent avatars next to brief card titles using the new `agents` data from Arvin's enriched listUnresolved API (#13489). - Add AgentAvatarInfo type and agents field to BriefItem - Render overlapping circular avatars (20px, -6px overlap) - Use cssVar.colorBgContainer for border (dark mode compatible) - Extract avatar style to function to avoid inline object creation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: clean up Daily Brief components - Extract duplicate success state JSX into reusable SuccessTag component - Remove redundant comments that describe what code does - Use DEFAULT_AVATAR from @lobechat/const instead of hardcoded emoji Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: address PR review feedback for Daily Brief - Use cssVar.colorBgBase instead of hardcoded #fff for primary button text color (dark mode contrast fix) - Add submitting state to CommentInput to prevent duplicate submissions (disable buttons + show loading during async submit) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🌐 chore: generate i18n translations for Daily Brief Run pnpm i18n to generate translations for all 18 locales. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: use shared BriefType from @lobechat/types Export BriefType union from packages/types and use it in BRIEF_TYPE_COLOR and BRIEF_TYPE_ICON records for compile-time key validation. Adding a new brief type now requires updating the shared type, and TypeScript will flag missing mappings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * style: update * style: update * style: update --------- Co-authored-by: Tsuki <976499226@qq.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * style: update * style: update * style: update * style: update * fix: stopPropagation * fix: i18n * 🐛 fix: wire comment inputs to editor instance so Send actually submits CommentInput in AgentTasks and DailyBrief used antd TextArea inside @lobehub/editor's ChatInput while reading content via editor.getDocument('markdown'). The TextArea was never connected to the editor instance, so getDocument always returned empty and handleSubmit short-circuited silently — Send appeared to do nothing (no network request fired). Replace the TextArea with <Editor editor={editor} type="text" variant="chat" /> so useEditor() actually drives the editable surface. Keep plain-text behavior via markdownOption={false} + enablePasteMarkdown={false}, and bind Cmd/Ctrl+Enter submit via onPressEnter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: use participant.title after TaskParticipant schema rename (#13877) PR #13877 renamed TaskParticipant.name → .title and added .backgroundColor. Our branch's UI code (AgentAvatars, listViewOptions, TaskList group header, Breadcrumb) was already written against the new schema, but TaskProperties still read firstParticipant?.name — update the last remaining call site so the type matches post-rebase. backgroundColor is already plumbed through everywhere it applies within #13877's scope; TaskActivities' TaskDetailActivityAuthor is a separate type untouched by the PR and kept as-is. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: resolve type-check errors exposed after canary rebase canary upgraded react-i18next to a version with typed i18n keys and tightened @lobehub/editor's SendButton + IEditor APIs. Rebase pulled these in, surfacing latent type errors in LOBE-6597 code. - CommentInput: use editor.cleanDocument() (IEditor's actual API; clearContent never existed). - TaskActivities / TaskLatestActivity / TaskTriggerTag: type t as TFunction<'chat'> so typed i18n accepts the known-literal keys used inside module-level helpers. - TaskPriorityTag / TaskStatusTag / listViewOptions: add defaultValue: '' to dynamic-key t() calls (template literals and Record lookups) to match the broad-key i18n overload. - BriefCardActions: swap unusable <SendButton> (no children, no iconPlacement) for <Button>; add defaultValue to the dynamic brief-action key lookup; drop stale @ts-ignore. - DailyBrief/CommentInput: drop unsupported children on SendButton; keep label via title attribute. - Recents/Item: type TYPE_ICON_MAP as Partial<Record<...>> so 'task' (rendered via TaskStatusIcon elsewhere) is a safe absent key. - brief/slices/list/action: cast briefService.listUnresolved() result back to BriefItem[] (TRPC serialization widens BriefType to string). - AgentTasks/TasksHeader: delete dead file — no importers and its ./style module was removed by an earlier refactor. Also ran pnpm install to materialize the newly-extracted @lobechat/agent-gateway-client workspace package (canary #13866), clearing ~7 "cannot find module" errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor(builtin-tool-task): polish task tool paths (#13869) * ✨ feat: navigate to task detail when clicking brief card header Clicking the header row of a Daily Brief card (icon + title + time + agent avatars) now jumps straight to the associated task, using the brief's task-tree agent (with activeAgent / inbox as fallback). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: show parent task ids as clickable breadcrumb trail Walk the cached parent chain from taskDetailMap and insert each ancestor's identifier as a link between the "任务" entry and the current task name in the task detail breadcrumb. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add cross-agent /tasks page with View All Tasks on Daily Brief - Register `/tasks` route in desktop (web + Electron) and mobile router configs - `useFetchTaskList` supports `allAgents` mode via options object API to fetch tasks without agent filter; backend already supports optional assigneeAgentId - `Breadcrumb` accepts optional `agentId`, renders "All tasks" crumb when absent - `AgentTaskItem` navigation uses `task.assigneeAgentId` so clicks work from the cross-agent page (falls back to `activeAgentId` for unassigned tasks) - Extract `useScenarioEnabledTools` hook to share layout effect between `/tasks/_layout` and `/agent/:aid/tasks/_layout` Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ♻️ refactor: use assigneeAgentId for task avatar instead of participants array Replace AgentAvatars (took participants[]) with AssigneeAvatar (takes agentId, resolves meta from agent store). This correctly represents that a task is assigned to a single agent via assigneeAgentId/detail.agentId. - New AssigneeAvatar component reads agent meta from agent store by ID - TaskProperties reads activeTaskAgentId from task detail store - listViewOptions uses task.assigneeAgentId directly for groupBy/sort - Extract shared isInboxAgentId helper to eliminate 4x inline duplication - Group headers resolve agent title at render time via AssigneeLabel component Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: enable vertical scrolling on cross-agent tasks page Add overflowY and flex to WideScreenContainer wrapper so the task list can scroll when content exceeds viewport height. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add re-assign task agent with popover selector - Add AssigneeAgentSelector component with Popover agent list - Extract useAgentDisplayMeta hook for consistent agent name/avatar resolution - Fix optimistic update mapping assigneeAgentId → agentId in task store - Disable reassignment for running tasks with tooltip hint - Integrate selector into task list and task detail property panel Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: reuse BriefCard in task detail activities & fix raw-id navigation Render brief-type activities as full BriefCard (same as homepage) instead of plain tree rows. Decouple BriefCardActions from useBriefStore for actions lookup so it can be reused across pages. Fix infinite loading when navigating to task detail via raw DB id (task_xxx) by storing detail under both the identifier and the raw id key in taskDetailMap. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add TopicCard component for task detail activities Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: allow re-running completed tasks with dedicated button Completed tasks now show a "Re-run" button (with rotate icon) instead of hiding the action. The backend already supported this — only the frontend selector gate needed updating. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: add create task modal with markdown editor Add a "+" button on the tasks list page that opens a Linear-style modal for manually creating tasks. The modal features a title input, a markdown editor (EditorCanvas), and a bottom toolbar with priority and assignee selectors. Existing tag components (TaskStatusTag, TaskPriorityTag, AssigneeAgentSelector) are extended with an `onChange` controlled mode so they can be used in creation context where no task exists yet. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 🐛 fix: suppress spurious updateTask on Task Detail page load EditorDataMode was missing the contentChangeLockRef pattern that DocumentIdMode already uses, causing Lexical's registerUpdateListener to treat programmatic content hydration as a user edit and fire onContentChange → updateTask on every page visit. - Add contentChangeLockRef + lockIdRef staleness guard - Extract loadContentWithLock to deduplicate lock/load/unlock logic - Pass contentChangeLockRef to InternalEditor - Remove unreachable dead code in loadEditorContent Closes LOBE-7362 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ✨ feat: task detail comment CRUD and various UX improvements Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 🐛 fix: move canceled status group to the end of task list Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: polish task detail layout, title, and run button - Title switched to auto-sizing TextArea so long names wrap (like Linear) - Reduce title font-size from 32px to 24px and tighten paddings - Make "运行任务" button small-sized to match the denser header - Add 120px bottom padding for end-of-content scroll breathing room - Default EditorCanvas paddingBottom trimmed from 64 to 32 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: refine task assignee, priority, and comment input - Assignee block uses filled variant in dark mode for better contrast - Urgent priority (level 1) renders in orange for quick scanning - Comment input keeps SendButton slot reserved to prevent layout shift Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat: task detail — inline subtasks, automation mode, chronological activity - Inline subtask creation under a task via CreateTaskInlineEntry (parentTaskId/autoFocus/onCollapse/placeholder), refreshes parent on create - Track agent-created tasks via createdByAgentId through service, router, types, and the builtin task executor - Replace scheduler Segmented-only UI with an Enable switch + heartbeat/ schedule mode; persist via automationMode on the task - Sort detail activities oldest → newest for a natural timeline reading - Reducer patches nested subtask entries on updateTaskDetail so in-place edits reflect in the parent's subtask tree Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: render activate-tool chips as rounded pills Switch inspector tool chips from monospace code tags to filled rounded pills with ellipsis overflow, making multi-tool rows scan better in tight headers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 🐛 fix: keep finished tool call out of loading state while siblings run The message-level isAssistantMessageBusy flag stays true while sibling tool calls are still running. Without guarding on this tool's own result, a finished tool would flip back to "loading". Now a tool that has a real result or error is never shown as calling. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: use small Segmented in schedule config popover Keeps the automation mode switcher visually aligned with the denser popover controls. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat: agent profile hover card on task activity author - Extract shared AgentProfileCard + unified AgentProfilePopup (click / hover) with lazy agent fetch; move out of group sidebar path. - Wire activity author avatar + name to a hover card; brighten title on hover; keep a small "agent" tag on the author row. - Show inline skeletons (description + footer stats) while loading. - Enrich subtask payload with assignee agent info for cleaner UI. * ✨ feat: open task topic chat in side drawer Click a topic row in the task detail activities to open a right-side drawer showing the topic's full chat history. Messages stream in live via the existing agent gateway pipeline (gateway events land in chatStore.dbMessagesMap keyed by the topic context), so a running topic refreshes its drawer in real time without a dedicated subscription. Reuses the Conversation feature (ConversationProvider + ChatList) with an isolated context (agentId + topicId + isolatedTopic), so the drawer never touches the global active topic and multiple panels coexist cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 💄 style: outline activate-tool chip with subtle border Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat: show topic handoff summary on activity card Pull `handoff.summary` through the task service into TaskDetailActivity and render it under the title in TopicCard so completed topics surface what was accomplished without opening the drawer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 🎸 chore: gate agent task feature behind agent_task flag Hide every client-side entry point to the Agent Task feature when the `agent_task` flag (default `isDev`, off in prod) is disabled: - Sidebar: task tab in the agent sidebar nav - Routes: `/agent/:aid/tasks/*` and `/tasks/*` layouts redirect to `/` when the flag is off (mobile router reuses the same layout) - Home Recents: filter out `type='task'` items in both the list and the "all recents" drawer - Daily Brief: skip fetch + hide the entire panel (all briefs link to tasks) Backend TRPC / lifecycle stays on — the feature is already live for CLI usage. Flag name mirrors `agent_onboarding` for consistency. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 🐛 fix: prioritize includeTriggers in topic queries * 🐛 fix: normalize task detail activity payloads * ✨ feat: add Kanban board view for task list with drag-and-drop LOBE-7493 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * 💄 style: shorten schedule tag labels & fix time width in task cards Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * update i18n * 💄 style: hide task tool from user selectors * 💄 style: hide task skill from user selectors --------- Co-authored-by: canisminor1990 <i@canisminor.cc> Co-authored-by: YuTengjing <ytj2713151713@gmail.com> Co-authored-by: Arvin Xu <arvinx@foxmail.com>1 个月前
♻️ refactor(tool): centralize availability checks (#12938) * ♻️ refactor(tool): centralize availability checks * 🐛 fix(tool): preserve windows skill fallback * 🐛 fix(tool): restore stdio engine filtering2 个月前
🐛 fix: upgrade desktop agent-browser to v0.20.1 and default native mode (#12985) * 🐛 fix(desktop): update bundled agent-browser to v0.20.1 and align native-mode docs Upgrade desktop bundled agent-browser to 0.20.1 and remove obsolete AGENT_BROWSER_NATIVE runtime override since native mode is now default. Update builtin agent-browser skill descriptions to reflect the new default behavior. Made-with: Cursor * ✨ feat: enable agent-browser skill on Windows desktop Made-with: Cursor * 🔧 refactor: remove isWindows from ToolAvailabilityContext interface Updated the ToolAvailabilityContext interface to remove the isWindows property, simplifying the context checks in the isBuiltinSkillAvailableInCurrentEnv function. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>2 个月前
✨ feat(agent-browser): add browser automation skill and tool detection (#12858) * ✨ feat(tool-detectors): add browser automation support and refactor tool detector categories - Introduced browser automation detectors to the tool detector manager. - Updated tool categories to include 'browser-automation'. - Refactored imports to use type imports where applicable for better clarity. - Cleaned up unnecessary comments in tool filters. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: add browser automation tool detection UI * 🔧 chore: update react-scan version and enhance agent-browser documentation - Updated `react-scan` dependency from version 0.4.3 to 0.5.3 in package.json. - Improved documentation in `content.ts` for the agent-browser, clarifying command usage and workflows. - Added development mode flag `__DEV__` in sharedRendererConfig for better environment handling. - Integrated `scan` functionality in `initialize.ts` to enable scanning in development mode. - Updated global type definitions to include `__DEV__` constant for clarity. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore(builtin-skills): add dependency and refactor skill filtering logic - Added `@lobechat/const` as a dependency in package.json. - Introduced a new function `shouldEnableBuiltinSkill` to determine if a skill should be enabled based on the environment. - Refactored the `builtinSkills` export to filter skills using the new logic. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore(builtin-skills): refactor skill management and add filtering logic - Removed unnecessary dependency from package.json. - Simplified skill filtering logic by introducing `filterBuiltinSkills` and `shouldEnableBuiltinSkill` functions. - Updated various components to utilize the new filtering logic for managing builtin skills based on the environment. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(builtin-skills): introduce new skill APIs and refactor manifest structure - Added new APIs for skill management: `runSkillApi`, `readReferenceApi`, and `exportFileApi` to enhance functionality. - Created a base manifest file (`manifest.base.ts`) to centralize API definitions. - Updated the desktop manifest (`manifest.desktop.ts`) to utilize the new base APIs. - Refactored existing manifest to streamline API integration and improve maintainability. - Introduced a detailed system prompt for better user guidance on skill usage. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: desktop skill runtime, skill store inspectors, and tool UI updates Made-with: Cursor * ✨ feat: enhance skill import functionality and testing - Updated `importFromUrl` method in `SkillImporter` to accept additional options for identifier and source. - Modified `importFromMarket` in `agentSkillsRouter` to utilize the new options for better tracking of skill imports. - Added integration tests to ensure stable behavior when re-importing skills from the market, verifying that identifiers remain consistent across imports. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update .gitignore and package.json dependencies - Added 'bin' to .gitignore to exclude binary files from version control. - Included 'fflate' as a new dependency in package.json to support file compression in the application. - Updated writeFile method in LocalFileCtr to handle file content as Uint8Array for improved type safety. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update package.json dependencies - Removed 'fflate' from dependencies and added it to devDependencies for better organization. - Ensured proper formatting by adding a newline at the end of the file. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add agent-browser download script and integrate binary handling - Introduced a new script to download the `agent-browser` binary, ensuring it is available for the application. - Updated `electron-builder.mjs` to include the binary in the build process. - Modified `dir.ts` to define the binary directory path based on the packaging state. - Enhanced the `App` class to set environment variables for the agent-browser integration. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: add DevTools toggle to Linux and Windows menus - Introduced a new menu item for toggling DevTools with the F12 accelerator key in both Linux and Windows menu implementations. - Added a separator for better organization of the view submenu items. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: integrate agent-browser binary download into build process - Added functionality to download the `agent-browser` binary during the build process in `electron-builder.mjs`. - Enhanced the download script with detailed logging for better visibility of the download status and errors. - Updated the `App` class to log the binary directory path for improved debugging. - Reintroduced the `AuthRequiredModal` in the layout for desktop users. Signed-off-by: Innei <tukon479@gmail.com> * fix: mock binary directory path in tests - Added a mock for the binary directory path in the App tests to facilitate testing of the agent-browser integration. - This change enhances the test environment by providing a consistent path for the binary during test execution. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: improve authorization notification handling - Updated the `notifyAuthorizationRequired` method to implement trailing-edge debounce, ensuring that rapid 401 responses are coalesced and the IPC event is sent after the burst settles. - Refactored the notification logic to enhance clarity and maintainability. ✨ feat: add desktop onboarding redirect - Introduced a `useEffect` hook in `StoreInitialization` to redirect users to the `/desktop-onboarding` page if onboarding is not completed, ensuring a smoother user experience on fresh installs. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix(desktop): hide Agent Browser skill on Windows Made-with: Cursor * 🔧 chore: update memory limits for build processes - Increased the `NODE_OPTIONS` memory limit for both `build:next` and `build:spa` scripts from 6144 to 7168, optimizing build performance and resource management. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>2 个月前