Skip to content

feat(store): 订阅即选「AI 自动调用 / 仅手动」+ 详情页使用方法#586

Open
papysans wants to merge 2 commits into
devfrom
feat/subscribe-invoke-mode
Open

feat(store): 订阅即选「AI 自动调用 / 仅手动」+ 详情页使用方法#586
papysans wants to merge 2 commits into
devfrom
feat/subscribe-invoke-mode

Conversation

@papysans

Copy link
Copy Markdown
Contributor

背景

配合 web 后端订阅 invokeModeXDfield/costrict-web#154)与 csc 落地(zgsm-sangfor/csc#86),知识中心订阅交互区分两种调用方式,并新增「使用方法」说明。

改动

  • 订阅即选下拉拆分按钮(skill/command):主按钮=「订阅,允许 AI 自动调用」;下拉=「订阅,仅手动 /name 调用」;已订阅可切换模式(走 favorite upsert,不会误取消订阅)。其余类型维持单按钮。
  • 「使用方法」区块usage-section.tsx仅订阅后可见):按 itemType + 当前 mode 给说明——
    • skill/command:随 auto/manual 联动 + /name 命令 chip(在工作空间 / CSC / CS-IDE 使用)
    • subagent:经 Task 工具委派;mcp:配参后 AI 直接调工具;rule/template 各自说明;plugin 沿用既有安装命令块
  • 订阅按钮 hover tooltip 改为说明跨终端免安装价值(原先错用了「分发」文案)
  • api.ts favorite(itemId, invokeMode?) 传可选 body;CapabilityItem.invokeMode 类型;三个详情宿主(detail/home/manager)+ 移动端 toggle 透传 mode

范围

模式开关仅 skill/command(它们是 prompt 型、走 AI 渐进式发现,disable-model-invocation 真实生效);subagent(Task 工具)/mcp(工具调用)/plugin/rule/template 不给开关,只给使用说明。

验证

  • tsgo typecheck EXIT=0
  • Playwright 视觉(portal):skill 拆分按钮 + 使用方法 auto 文案 + /name chip;下拉切 manual → 使用方法实时联动;未订阅时使用方法隐藏、订阅后出现;subagent 单按钮 + Task 文案;hover tooltip 正确。截图见提交附带的 .playwright-mcp/
  • 对抗评审抓到并修复 1 个 P0 崩溃DropdownMenu.GroupLabel 必须包 <DropdownMenu.Group>(Kobalte 否则抛错→已订阅项开下拉崩错误边界)。

依赖 / 部署

papysans added 2 commits June 29, 2026 14:31
…tion

For skill/command items the subscribe control becomes a split button:
the main action subscribes with AI auto-invoke allowed, the dropdown
offers "manual /name only" and lets a subscriber switch mode later
(favorite upsert, never an accidental unsubscribe).

Adds a "How to use" section (shown only after subscribing) that
explains, per item type and current mode, how to use the resource in
the Workspace / CSC / CS-IDE. The subscribe tooltip now describes the
cross-terminal, install-free benefit instead of the distribute copy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant