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:
@@ -239,7 +239,7 @@ export class WorkspaceRepo {
|
||||
// is a real jsonb object, never a double-encoded string. The CASE self-heals
|
||||
// workspaces whose settings.ai.provider was previously corrupted into an
|
||||
// array/string.
|
||||
const ALLOWED = ['driver', 'chatModel', 'embeddingModel', 'baseUrl', 'embeddingBaseUrl', 'sttModel', 'sttBaseUrl', 'sttApiStyle', 'systemPrompt', 'publicShareChatModel'];
|
||||
const ALLOWED = ['driver', 'chatModel', 'embeddingModel', 'baseUrl', 'embeddingBaseUrl', 'sttModel', 'sttBaseUrl', 'sttApiStyle', 'systemPrompt', 'publicShareChatModel', 'publicShareAssistantRoleId'];
|
||||
const entries = Object.entries(provider).filter(
|
||||
([k, v]) => v !== undefined && ALLOWED.includes(k),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user