The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): style inline code in group chats
KoNit-K2354782b6b14
diff --git a/apps/desktop/src/plugins/hermes-bots/group-chat-inline-code.test.ts b/apps/desktop/src/plugins/hermes-bots/group-chat-inline-code.test.tsnew file mode 100644index 00000000000..88b627eee50--- /dev/null+++ b/apps/desktop/src/plugins/hermes-bots/group-chat-inline-code.test.ts@@ -0,0 +1,14 @@+import { readFileSync } from 'node:fs'+import { join } from 'node:path'++import { expect, it } from 'vitest'++const styles = readFileSync(join(process.cwd(), 'src/styles.css'), 'utf8')+const groupChatView = readFileSync(join(process.cwd(), 'src/plugins/hermes-bots/group-chat-view.tsx'), 'utf8')++it('uses theme-backed inline-code colors in Bot Mode group-chat messages', () => {+ expect(groupChatView).toContain('data-slot="group-chat-message-content"')+ expect(styles).toMatch(+ /\[data-slot='group-chat-message-content'\][\s\S]*?:not\(pre\) > code[\s\S]*?background: var\(--ui-inline-code-background\);[\s\S]*?color: var\(--ui-inline-code-foreground\);/+ )+})diff --git a/apps/desktop/src/plugins/hermes-bots/group-chat-view.tsx b/apps/desktop/src/plugins/hermes-bots/group-chat-view.tsxindex f1d049ed4ff..c624d766f64 100644--- a/apps/desktop/src/plugins/hermes-bots/group-chat-view.tsx+++ b/apps/desktop/src/plugins/hermes-bots/group-chat-view.tsx@@ -1113,6 +1113,7 @@ export function GroupChatWorkspace({ group, members, onBack, visible = true }: GclassName="min-w-0 text-xs text-(--ui-text-secondary) [&_p]:mb-1 [&_p:last-child]:mb-0 [&_ul]:mb-1 [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:mb-1 [&_ol]:list-decimal [&_ol]:pl-4 [&_pre]:overflow-x-auto" // The app shell sets user-select: none globally; message bodies opt// back in so drag-select and ⌘C work in group chat logs.data-selectable-text="true"+ data-slot="group-chat-message-content">{MessageTextContent ? (<MessageTextContent decorateText={mentionText} media={!member?.remoteSource} text={entry.text} />diff --git a/apps/desktop/src/styles.css b/apps/desktop/src/styles.cssindex e1ea2271e05..3778c25e82e 100644--- a/apps/desktop/src/styles.css+++ b/apps/desktop/src/styles.css@@ -1995,7 +1995,8 @@ body.guest-pointer-lock :is(webview, iframe) {mask-image: linear-gradient(to bottom, black 0%, black calc(100% - 1.5rem), rgb(0 0 0 / 64%) 100%);}-[data-slot='aui_assistant-message-content'] .aui-md :not(pre) > code {+[data-slot='aui_assistant-message-content'] .aui-md :not(pre) > code,+[data-slot='group-chat-message-content'] :not(pre) > code {background: var(--ui-inline-code-background);color: var(--ui-inline-code-foreground);}