Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
export type PlaintextEditorChrome = 'code' | 'markdown' | 'plain';
export function getPlaintextEditorChrome(language: string | undefined): PlaintextEditorChrome {
const normalizedLanguage = language?.toLowerCase();
const isMarkdown = normalizedLanguage === 'markdown' || normalizedLanguage === 'md';
if (isMarkdown) return 'markdown';
if (normalizedLanguage) return 'code';
return 'plain';
}