AI assist: a site switch for alt text on assets, the altText reservation, a bound on totals.groups and the scrub of a principal's name

未关闭
#3,449 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp

调研方向

Start in src/plugins/FluentCMS.Plugins.AiAssist/, especially AiAssistService.cs around line 241, and trace the asset field settings, usage endpoint, and SDK activity text helpers described in the issue. Read the related issues #3418 and #3439 and backend spec 5.5; the request spans plugin behavior, SDK access, tests, and spec corrections. Done means all six requested changes are covered, including a test for the site switch.

由索引模型根据 Issue 内容生成。

描述

plugin type:bug

Follow-ups of alt text for an asset and of the names in the AI usage (#3418, #3439), found in its review. Paths are under src/plugins/FluentCMS.Plugins.AiAssist/.

  • No site switch for alt text on assets. Once a site names a provider, every image a caller may read and update can be sent to it, also with fields empty. Let a site turn the action off for assets.
  • altText reserves the estimate of a draft it does not read. With no text, the call reserves MaxInputLength × 3 tokens (60,000 by default) until the image is read (AiAssistService.cs, around line 241). Older than #3439; the asset path always meets it.
  • totals.groups has no bound. It is computed and returned with every page of GET /ai/usage: principals × actions.
  • A plugin cannot scrub and cut an actor's name as core does. Core writes a version's author and an activity row's actor through ActivityText.Required (SecretScrubber.Of, then a cut that respects surrogate pairs), both internal. The AI usage row stores the name raw, so one key name can read scrubbed in a version's authorName and raw in /ai/usage. Give plugins the scrub and the cut through the SDK.
  • Text. Backend spec 5.5 ("Usage") names the migration InitialAi; the class is Initial. The line "Waits for #3101 and #3103" under the table of admin spec 5.5 is stale.
  • Nit. MayDescribeAssetsAsync asks ResourcesAsync twice; IEffectiveAccess.HeldAsync, already injected, answers it in one call.

Wanted

  • A setting of the site, off or on, for alt text on assets, shown by GET /ai/fields, with a test.
  • The reservation of altText sized to what the call sends.
  • totals.groups bounded or paged, or asked for by a parameter.
  • The SDK member, and the usage row written through it.
  • The two sentences corrected.

Bundle 29.

主要语言
C#
星标
567
派生
107
平均合并
1 小时 19 分钟
30 天内合并 PR
353

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fluentcms/FluentCMS 的其他 Issue

查看 fluentcms/FluentCMS 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。