feat(public-share): selectable agent-role identity + fix floating-icon overlap
Anonymous public-share AI assistant: - Add a workspace setting `publicShareAssistantRoleId` so an admin can pick which agent role (identity/persona) the anonymous assistant adopts. The role's instructions REPLACE the built-in persona while the immutable safety framework is still always appended; the role's optional model override takes precedence over the cheap publicShareChatModel. Resolved server-authoritatively (workspace-scoped, soft-delete aware; disabled/missing roles fall back to the built-in persona, so the tool scope remains the real security boundary). - Plumb the field through the update DTO, ai-settings service, the workspace.repo ALLOWED whitelist, resolve()/getMasked(), stream-time role resolution and the prompt/model, plus the settings UI: a new "Assistant identity" Select listing enabled roles (and surfacing a saved-but-disabled role explicitly). Public-share branding / floating icon: - Fix the AI assistant FAB overlapping the "Powered by ..." button (both were Affixed bottom-right): stack the FAB above the bottom-right branding. - Rename "Powered by Docmost" -> "Powered by Gitmost" and point the link at the gitmost repo. Tests: extend public-share-chat.spec (role persona replacement still appends the safety framework, resolveShareRole edge cases, model-override precedence). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,9 @@ export interface IAiSettings {
|
||||
chatModel?: string;
|
||||
// Cheap model id for the anonymous public-share assistant; empty = chatModel.
|
||||
publicShareChatModel?: string;
|
||||
// Agent-role id whose persona the public-share assistant adopts; empty =
|
||||
// built-in locked persona.
|
||||
publicShareAssistantRoleId?: string;
|
||||
embeddingModel?: string;
|
||||
baseUrl?: string;
|
||||
embeddingBaseUrl?: string;
|
||||
@@ -45,6 +48,9 @@ export interface IAiSettingsUpdate {
|
||||
driver?: AiDriver;
|
||||
chatModel?: string;
|
||||
publicShareChatModel?: string;
|
||||
// Agent-role id whose persona the public-share assistant adopts; empty =
|
||||
// built-in locked persona.
|
||||
publicShareAssistantRoleId?: string;
|
||||
embeddingModel?: string;
|
||||
baseUrl?: string;
|
||||
embeddingBaseUrl?: string;
|
||||
|
||||
Reference in New Issue
Block a user