建议通过 ExtensionGetter 去获取 AI Service #1

Closed
opened 2026-06-17 12:32:06 +08:00 by ruibaby · 1 comment
ruibaby commented 2026-06-17 12:32:06 +08:00 (Migrated from github.com)

https://github.com/sunny-335/plugin-comment-ai-autopilot/blob/b82fc724cd6ae65990532c36438a32b8dc06cecd/src/main/java/top/nxxy335/commentaiautopilot/service/AiFoundationClient.java#L120

这种方式并不推荐。

文档:https://github.com/halo-dev/plugin-ai-foundation/blob/main/dev/dev.md

除了获取 class 的问题,还需要在 plugin.yaml 中声明插件依赖:

spec:
  pluginDependencies:
    ai-foundation?: "*"

此外,为了让用户能够在应用市场安装之后推荐安装 AI Foundation 插件,还可以在 plugin.yaml 中声明:

metadata:
  annotations:
     # https://www.halo.run/store/apps/app-acslk9nu
    "store.halo.run/recommended-apps": '["app-acslk9nu"]'
https://github.com/sunny-335/plugin-comment-ai-autopilot/blob/b82fc724cd6ae65990532c36438a32b8dc06cecd/src/main/java/top/nxxy335/commentaiautopilot/service/AiFoundationClient.java#L120 这种方式并不推荐。 文档:https://github.com/halo-dev/plugin-ai-foundation/blob/main/dev/dev.md 除了获取 class 的问题,还需要在 plugin.yaml 中声明插件依赖: ```yaml spec: pluginDependencies: ai-foundation?: "*" ``` 此外,为了让用户能够在应用市场安装之后推荐安装 AI Foundation 插件,还可以在 plugin.yaml 中声明: ```yaml metadata: annotations: # https://www.halo.run/store/apps/app-acslk9nu "store.halo.run/recommended-apps": '["app-acslk9nu"]' ```
sunny-335 commented 2026-06-17 19:10:06 +08:00 (Migrated from github.com)

感谢提议,该问题将于下个版本改进。

感谢提议,该问题将于下个版本改进。
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nxxy335/plugin-comment-ai-autopilot#1