Skip to content

feat: 插件版布局#17

Merged
Windsland52 merged 7 commits intomainfrom
feat/vsclaunch
Mar 23, 2026
Merged

feat: 插件版布局#17
Windsland52 merged 7 commits intomainfrom
feat/vsclaunch

Conversation

@Windsland52
Copy link
Member

@Windsland52 Windsland52 commented Mar 23, 2026

由 Sourcery 提供的摘要

引入可嵌入的布局/配置系统,并将桥接通信重构为可复用的 composable。

新功能:

  • 添加基于 URL 的嵌入模式解析和嵌入配置,以针对独立运行和 VSCode 启动场景定制 UI 行为。
  • 在根应用中暴露嵌入模式和基于配置的标志,用于控制教程自动启动、筛选器、实时状态、重新加载控件以及可用视图。
  • 增强 ProcessView,使其在移动端和桌面端的节点时间线布局中都可以选择性地显示实时状态和重新加载控件。

增强:

  • 将 JSON-RPC 桥接处理提取到可复用的 useBridge composable 中,从而简化 App.vue 并将父窗口通信逻辑集中管理。
Original summary in English

Summary by Sourcery

Introduce an embeddable layout/profile system and refactor bridge communication into a reusable composable.

New Features:

  • Add URL-based embed mode parsing and embed profiles to tailor UI behavior for standalone and VSCode launch contexts.
  • Expose embed mode and profile-driven flags in the root app to control tutorial auto-start, filters, realtime status, reload controls, and available views.
  • Enhance ProcessView to optionally display realtime status and reload controls in both mobile and desktop node timeline layouts.

Enhancements:

  • Extract JSON-RPC bridge handling into a reusable useBridge composable, simplifying App.vue and centralizing parent window communication logic.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我在这里留下了一些高层次的反馈:

  • useBridge 中,返回的控制器方法(sendNotificationsendResult 等)即使在 options.enabledfalse 时仍然会发送消息;如果 enabled 的语义是完全禁用 bridge,建议在这些方法中使用 no-op 实现或在开头尽早返回,以避免出现意料之外的消息发送。
  • 进程/线程筛选器的 v-if 条件从检查 availableProcessIds/availableThreadIds.length > 0 改成了 showProcessThreadFilters,这现在可能会在初始加载时渲染空的下拉选择框;如果这不是预期行为,你可能需要把 length 检查也包含在可见性条件中。
给 AI 代理的提示
Please address the comments from this code review:

## Overall Comments
- In `useBridge`, the returned controller methods (`sendNotification`, `sendResult`, etc.) still post messages even when `options.enabled` is `false`; if `enabled` is meant to fully disable the bridge, consider no-op implementations or early returns in these methods to avoid unexpected messaging.
- The process/thread filter `v-if` conditions were changed from checking `availableProcessIds/availableThreadIds.length > 0` to `showProcessThreadFilters`, which can now render empty selects on initial load; if this is unintended, you may want to include the length checks as part of the visibility condition.

Sourcery 对开源项目免费——如果你觉得我们的评审有帮助,请考虑分享给其他人 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈来改进之后的评审。
Original comment in English

Hey - I've left some high level feedback:

  • In useBridge, the returned controller methods (sendNotification, sendResult, etc.) still post messages even when options.enabled is false; if enabled is meant to fully disable the bridge, consider no-op implementations or early returns in these methods to avoid unexpected messaging.
  • The process/thread filter v-if conditions were changed from checking availableProcessIds/availableThreadIds.length > 0 to showProcessThreadFilters, which can now render empty selects on initial load; if this is unintended, you may want to include the length checks as part of the visibility condition.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `useBridge`, the returned controller methods (`sendNotification`, `sendResult`, etc.) still post messages even when `options.enabled` is `false`; if `enabled` is meant to fully disable the bridge, consider no-op implementations or early returns in these methods to avoid unexpected messaging.
- The process/thread filter `v-if` conditions were changed from checking `availableProcessIds/availableThreadIds.length > 0` to `showProcessThreadFilters`, which can now render empty selects on initial load; if this is unintended, you may want to include the length checks as part of the visibility condition.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Windsland52 Windsland52 merged commit 79b8dc5 into main Mar 23, 2026
5 checks passed
@Windsland52 Windsland52 deleted the feat/vsclaunch branch March 23, 2026 03:41
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