Make every identity editable: agent and operator names plus avatars
- Migration 049: avatar_emoji/avatar_color on agents and employees - updateAgent accepts a new name (mention-name validated) and avatar; new updateEmployeeProfile renames the operator and sets their avatar - Avatars are emoji-on-color tiles (renderer CSP blocks remote images); an AvatarDirectoryContext built from the snapshot lets the shared Avatar component honor custom looks at every call site - chat rows, conversation list, org chart, office card, sidebar - without threading props through pages - Team edit dialog gains Name + avatar editor (CEO included); the sidebar foot opens an Edit-profile dialog for the operator - e2e: rename an agent to a new mention handle with an emoji avatar, edit the operator profile, both verified in the live shell
This commit is contained in:
1 parent
86aa6fdb29
commit
e55b8b85b0
20 files changed
+377
-31
No files matched your search
@@ -27,6 +27,8 @@ export interface CreateOrganizationInput {
|
||||
export interface UpdateAgentInput {
|
||||
orgId: string;
|
||||
agentId: string;
|
||||
/** New display name; omit to keep the current one. */
|
||||
name?: string;
|
||||
role: string;
|
||||
title: string;
|
||||
roleLevel: string;
|
||||
@@ -34,6 +36,18 @@ export interface UpdateAgentInput {
|
||||
budgetCents: number;
|
||||
modelProviderId: string | null;
|
||||
modelId: string | null;
|
||||
/** Emoji shown on the avatar tile; empty string clears it. */
|
||||
avatarEmoji?: string;
|
||||
/** Background color for the avatar tile; empty string clears it. */
|
||||
avatarColor?: string;
|
||||
}
|
||||
|
||||
export interface UpdateEmployeeProfileInput {
|
||||
orgId: string;
|
||||
employeeId: string;
|
||||
displayName: string;
|
||||
avatarEmoji?: string;
|
||||
avatarColor?: string;
|
||||
}
|
||||
|
||||
export interface CreateAgentInput {
|
||||
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
CancelProviderResponseInput,
|
||||
CreateAgentInput,
|
||||
UpdateAgentInput,
|
||||
UpdateEmployeeProfileInput,
|
||||
CreateApprovalInput,
|
||||
CreateAutomationRuleInput,
|
||||
CreateDocumentInput,
|
||||
@@ -107,6 +108,7 @@ export interface DesktopApi {
|
||||
createOrganization(input: CreateOrganizationInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
createAgent(input: CreateAgentInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
updateAgent(input: UpdateAgentInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
updateEmployeeProfile(input: UpdateEmployeeProfileInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
createTask(input: CreateTaskInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
updateTask(input: UpdateTaskInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
deleteTask(input: DeleteTaskInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
|
||||
@@ -49,6 +49,8 @@ export interface EmployeeRecord {
|
||||
orgId: string;
|
||||
displayName: string;
|
||||
role: string;
|
||||
avatarEmoji: string | null;
|
||||
avatarColor: string | null;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
@@ -69,6 +71,8 @@ export interface AgentRecord {
|
||||
heartbeatEnabled: boolean;
|
||||
heartbeatIntervalSec: number;
|
||||
lifecycle: string;
|
||||
avatarEmoji: string | null;
|
||||
avatarColor: string | null;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ export const IPC_CHANNELS = {
|
||||
createOrganization: "agentcompany:create-organization",
|
||||
createAgent: "agentcompany:create-agent",
|
||||
updateAgent: "agentcompany:update-agent",
|
||||
updateEmployeeProfile: "agentcompany:update-employee-profile",
|
||||
createTask: "agentcompany:create-task",
|
||||
updateTask: "agentcompany:update-task",
|
||||
deleteTask: "agentcompany:delete-task",
|
||||
|
||||
Reference in new issue
Block a user