Skip to content

AI-powered virtual executive team — a single coherent executive persona backed by 8 specialist agents (FastAPI + Next.js).

7.5 KB
Raw Blame
import type { SessionChannel } from "@/lib/sessionChannel";

// Each channel's own app logo, shown after a chat's title and on the filter
// tabs on /chats, so where a chat came from reads at a glance. Web chats get
// the Open Executive mark. Email has no one app (people write from any mail
// app), so it gets a plain envelope. The SVGs are inlined as data URLs: no
// extra requests, and their gradient ids can't clash on a page of many rows.
export const CHANNEL_LOGO_SVG: Record<SessionChannel, string> = {
  web:
    "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><rect width=\"48\" height=\"48\" rx=\"11\" fill=\"#4F46E5\"/><circle cx=\"24\" cy=\"24\" r=\"14\" fill=\"none\" stroke=\"#fff\" stroke-width=\"2.2\" opacity=\"0.85\"/><circle cx=\"24\" cy=\"10\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"33\" cy=\"13.28\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"37.79\" cy=\"21.57\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"36.12\" cy=\"31\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"28.79\" cy=\"37.16\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"19.21\" cy=\"37.16\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"11.88\" cy=\"31\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"10.21\" cy=\"21.57\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"15\" cy=\"13.28\" r=\"3.8\" fill=\"#4F46E5\"/><circle cx=\"24\" cy=\"10\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"33\" cy=\"13.28\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"37.79\" cy=\"21.57\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"36.12\" cy=\"31\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"28.79\" cy=\"37.16\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"19.21\" cy=\"37.16\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"11.88\" cy=\"31\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"10.21\" cy=\"21.57\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"15\" cy=\"13.28\" r=\"2.9\" fill=\"#fff\"/><circle cx=\"24\" cy=\"24\" r=\"6\" fill=\"#fff\"/></svg>",
  slack:
    "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"><path fill=\"#E01E5A\" d=\"M53.841 161.32c0 14.832-11.987 26.82-26.819 26.82S.203 176.152.203 161.32c0-14.831 11.987-26.818 26.82-26.818H53.84zm13.41 0c0-14.831 11.987-26.818 26.819-26.818s26.819 11.987 26.819 26.819v67.047c0 14.832-11.987 26.82-26.82 26.82c-14.83 0-26.818-11.988-26.818-26.82z\"/><path fill=\"#36C5F0\" d=\"M94.07 53.638c-14.832 0-26.82-11.987-26.82-26.819S79.239 0 94.07 0s26.819 11.987 26.819 26.819v26.82zm0 13.613c14.832 0 26.819 11.987 26.819 26.819s-11.987 26.819-26.82 26.819H26.82C11.987 120.889 0 108.902 0 94.069c0-14.83 11.987-26.818 26.819-26.818z\"/><path fill=\"#2EB67D\" d=\"M201.55 94.07c0-14.832 11.987-26.82 26.818-26.82s26.82 11.988 26.82 26.82s-11.988 26.819-26.82 26.819H201.55zm-13.41 0c0 14.832-11.988 26.819-26.82 26.819c-14.831 0-26.818-11.987-26.818-26.82V26.82C134.502 11.987 146.489 0 161.32 0s26.819 11.987 26.819 26.819z\"/><path fill=\"#ECB22E\" d=\"M161.32 201.55c14.832 0 26.82 11.987 26.82 26.818s-11.988 26.82-26.82 26.82c-14.831 0-26.818-11.988-26.818-26.82V201.55zm0-13.41c-14.831 0-26.818-11.988-26.818-26.82c0-14.831 11.987-26.818 26.819-26.818h67.25c14.832 0 26.82 11.987 26.82 26.819s-11.988 26.819-26.82 26.819z\"/></svg>",
  telegram:
    "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"><defs><linearGradient id=\"logosTelegram0\" x1=\"50%\" x2=\"50%\" y1=\"0%\" y2=\"100%\"><stop offset=\"0%\" stop-color=\"#2AABEE\"/><stop offset=\"100%\" stop-color=\"#229ED9\"/></linearGradient></defs><path fill=\"url(#logosTelegram0)\" d=\"M128 0C94.06 0 61.48 13.494 37.5 37.49A128.04 128.04 0 0 0 0 128c0 33.934 13.5 66.514 37.5 90.51C61.48 242.506 94.06 256 128 256s66.52-13.494 90.5-37.49c24-23.996 37.5-56.576 37.5-90.51s-13.5-66.514-37.5-90.51C194.52 13.494 161.94 0 128 0\"/><path fill=\"#FFF\" d=\"M57.94 126.648q55.98-24.384 74.64-32.152c35.56-14.786 42.94-17.354 47.76-17.441c1.06-.017 3.42.245 4.96 1.49c1.28 1.05 1.64 2.47 1.82 3.467c.16.996.38 3.266.2 5.038c-1.92 20.24-10.26 69.356-14.5 92.026c-1.78 9.592-5.32 12.808-8.74 13.122c-7.44.684-13.08-4.912-20.28-9.63c-11.26-7.386-17.62-11.982-28.56-19.188c-12.64-8.328-4.44-12.906 2.76-20.386c1.88-1.958 34.64-31.748 35.26-34.45c.08-.338.16-1.598-.6-2.262c-.74-.666-1.84-.438-2.64-.258c-1.14.256-19.12 12.152-54 35.686c-5.1 3.508-9.72 5.218-13.88 5.128c-4.56-.098-13.36-2.584-19.9-4.708c-8-2.606-14.38-3.984-13.82-8.41c.28-2.304 3.46-4.662 9.52-7.072\"/></svg>",
  discord:
    "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 199\"><path fill=\"#5865F2\" d=\"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18\"/></svg>",
  email:
    "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><rect width=\"48\" height=\"48\" rx=\"11\" fill=\"#0EA5E9\"/><rect x=\"10\" y=\"14\" width=\"28\" height=\"20\" rx=\"3\" fill=\"#fff\"/><path d=\"M11 16l13 10l13-10\" fill=\"none\" stroke=\"#0EA5E9\" stroke-width=\"2.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>",
  google_chat:
    "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 311 320\"><g fill=\"none\" stroke-width=\"2\"><path stroke=\"#7e916f\" d=\"m76.37.51l.01 76.47\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#1375eb\" d=\"M76.38 76.98L0 76.96\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#f3801d\" d=\"M235.08 1.09q-.16.06-.27.13q-.17.09-.17.28l-.02 75.51\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#7eb426\" d=\"M234.62 77.01h-.05\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#91a080\" d=\"m76.41 77.01l-.03-.03\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#75783e\" d=\"m310.53 76.77l-75.91.24\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#138495\" d=\"M76.43 182.69L0 182.67\" vector-effect=\"non-scaling-stroke\"/><path stroke=\"#00983a\" d=\"m76.44 259.13l-.01-38.28\" vector-effect=\"non-scaling-stroke\"/></g><path fill=\"#0066da\" d=\"m76.37.51l.01 76.47L0 76.96V20.77q.85-5.96 3.53-10.01Q10.14.74 22.75.67Q49.41.53 76.37.51\"/><path fill=\"#fbbc04\" d=\"m76.37.51l157.42.02a1.61 1.57-26.7 0 1 .92.29l.37.27q-.16.06-.27.13q-.17.09-.17.28l-.02 75.51h-.05l-158.16.01l-.03-.03Z\"/><path fill=\"#ea4335\" d=\"m235.08 1.09l75.45 75.68l-75.91.24l.02-75.51q0-.19.17-.28q.11-.07.27-.13\"/><path fill=\"#2684fc\" d=\"m0 76.96l76.38.02l.03.03l.02 105.68L0 182.67Z\"/><path fill=\"#00ac47\" d=\"m310.53 76.77l.47.34v161.9q-2.66 14.53-15.06 18.77q-4.42 1.52-13.03 1.5q-55.89-.09-112.92-.17q-8.28-.01-16.8.12q-.47.01-.8.34q-27.9 27.77-56 56.02c-2.87 2.89-6.12 4.5-10.24 3.89q-5.76-.85-8.49-5.94q-1.15-2.16-1.17-7.88q-.07-23.19-.05-46.53l-.01-38.28l37.78-37.78a1.79 1.77 22.3 0 1 1.26-.52l118.3.04a.83.83 0 0 0 .83-.83l-.03-104.75h.05Z\"/><path fill=\"#00832d\" d=\"M76.43 182.69v38.16l.01 38.28q-23.97.14-47.53.09q-9.82-.02-14.15-1.54Q2.62 253.44 0 238.88v-56.21Z\"/></svg>",
};

export function channelLogoSrc(channel: SessionChannel): string {
  return `data:image/svg+xml;utf8,${encodeURIComponent(CHANNEL_LOGO_SVG[channel])}`;
}