Skip to content

Conversation

@cp89cyber
Copy link
Contributor

@cp89cyber cp89cyber commented Oct 19, 2025

full-width chat area & adjustable code font size

issue #909

Summary by CodeRabbit

  • New Features

    • Added Poe as a new LLM provider option
    • Added customizable code font size settings with five size options
    • Added Poe provider icon for visual identification
  • UI Updates

    • Improved chat input layout
  • Localization

    • Added translations for new settings in English and Chinese

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 19, 2025

Walkthrough

This PR integrates a new Poe LLM provider as an OpenAI-compatible endpoint and introduces a configurable code font size feature. The Poe provider is registered in the configuration and provider instantiation logic. The code font size feature includes store state, UI controls, CSS styling, and composable integration for persistence.

Changes

Cohort / File(s) Summary
Poe Provider Backend Configuration
src/main/presenter/configPresenter/providers.ts, src/main/presenter/llmProviderPresenter/index.ts, src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
Adds Poe provider entry to DEFAULT_PROVIDERS with metadata, baseUrl, and API documentation links. Creates new PoeProvider class extending OpenAICompatibleProvider to tag models with group 'Poe'. Updates provider instantiation logic to dispatch Poe provider creation.
Poe UI Integration
src/renderer/src/components/icons/ModelIcon.vue
Registers poeColorIcon in the model icon registry to render Poe-branded icons in the UI.
Code Font Size Store & Composable
src/renderer/src/stores/settings.ts, src/renderer/src/composables/useCodeFontSize.ts
Introduces CODE_FONT_SIZE_VALUES array (12px–20px), reactive state codeFontSizeLevel, computed value codeFontSizeValue, and updateCodeFontSizeLevel() method. Composable watches store changes and updates CSS variable --dc-code-font-size on document root.
Code Font Size UI & Styling
src/renderer/settings/components/DisplaySettings.vue, src/renderer/src/assets/style.css, src/renderer/src/i18n/{en-US,zh-CN}/settings.json
Adds code font size control section in settings with 5 size options. Introduces CSS custom property --dc-code-font-size (default 14px) applied to .prose pre, .prose code, .cm-editor selectors. Adds display.codeFontSize translation keys.
Component Setup & Layout
src/renderer/src/App.vue, src/renderer/src/components/ChatInput.vue
Initializes useCodeFontSize() in App.vue setup. Removes max-width and horizontal centering from ChatInput wrapper div.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

The PR covers two distinct feature areas with moderate scope: Poe provider integration follows established patterns but requires validation of provider metadata and model tagging; code font size feature spans state management, UI controls, and CSS integration with standard persistence logic. File distribution is moderate, and most changes are cohesive within their respective feature domains.

Possibly related PRs

  • PR Add poe  #1028: Adds Poe provider integration and ModelIcon mapping—directly overlapping implementation of same Poe LLM provider support
  • PR feat(window): add settings window #996: Modifies DisplaySettings.vue layout and styling—touches the same component modified here for code font size settings
  • PR Feature/support aihubmix app code #566: Adds new LLM provider implementation with llmProviderPresenter updates—similar pattern for registering providers in the instantiation logic

Suggested labels

codex

Suggested reviewers

  • zerob13

Poem

🐰 A rabbit hops through code so bright,
Adding Poe and fonts just right!
Code blocks sparkle, settings glow,
Every size from high to low.
✨ New providers, CSS dreams—
A PR perfected, or so it seems!

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title "Issue#909" is a vague and generic reference that provides no meaningful information about the actual changes in the pull request. While it technically references an issue number related to the work, it does not convey what was implemented or changed. The PR summary indicates the work involves implementing a full-width chat area, adding adjustable code font size, and adding Poe provider support, but none of this is communicated by the title alone. A reviewer scanning the commit history would not understand the purpose or scope of these changes from the title. Replace the title with a more descriptive single sentence that captures the main changes, such as "Add adjustable code font size and full-width chat area with Poe provider support" or a shorter variant like "Add code font size settings and Poe provider". This will help reviewers and maintainers quickly understand the scope of changes when scanning the project history.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/renderer/src/composables/useCodeFontSize.ts (1)

8-25: LGTM! Consider using VueUse's useCssVar for a more declarative approach.

The implementation is functional and correct. However, you could simplify this composable using VueUse's useCssVar helper, which provides a more declarative way to sync reactive values with CSS custom properties.

Based on learnings.

Optional refactor using VueUse:

-import { watch } from 'vue'
+import { useCssVar } from '@vueuse/core'
 import { useSettingsStore } from '@/stores/settings'

 /**
  * Composable for managing code font size
  * Updates the CSS custom property when the setting changes
  */
 export function useCodeFontSize() {
   const settingsStore = useSettingsStore()
+  const codeFontSizeCssVar = useCssVar('--dc-code-font-size')

-  // Update CSS custom property when code font size changes
-  watch(
-    () => settingsStore.codeFontSizeValue,
-    (newSize) => {
-      document.documentElement.style.setProperty('--dc-code-font-size', newSize)
-    },
-    { immediate: true }
-  )
+  // Sync CSS variable with store value
+  watch(
+    () => settingsStore.codeFontSizeValue,
+    (newSize) => {
+      codeFontSizeCssVar.value = newSize
+    },
+    { immediate: true }
+  )

   return {
     codeFontSizeLevel: settingsStore.codeFontSizeLevel,
     codeFontSizeValue: settingsStore.codeFontSizeValue,
     updateCodeFontSizeLevel: settingsStore.updateCodeFontSizeLevel
   }
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b3e5e93 and 6151909.

📒 Files selected for processing (12)
  • src/main/presenter/configPresenter/providers.ts (1 hunks)
  • src/main/presenter/llmProviderPresenter/index.ts (3 hunks)
  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts (1 hunks)
  • src/renderer/settings/components/DisplaySettings.vue (2 hunks)
  • src/renderer/src/App.vue (2 hunks)
  • src/renderer/src/assets/style.css (2 hunks)
  • src/renderer/src/components/ChatInput.vue (1 hunks)
  • src/renderer/src/components/icons/ModelIcon.vue (2 hunks)
  • src/renderer/src/composables/useCodeFontSize.ts (1 hunks)
  • src/renderer/src/i18n/en-US/settings.json (1 hunks)
  • src/renderer/src/i18n/zh-CN/settings.json (1 hunks)
  • src/renderer/src/stores/settings.ts (7 hunks)
🧰 Additional context used
📓 Path-based instructions (27)
src/renderer/src/**/*

📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)

src/renderer/src/**/*: All user-facing strings must use i18n keys (avoid hardcoded user-visible text in code)
Use the 'vue-i18n' framework for all internationalization in the renderer
Ensure all user-visible text in the renderer uses the translation system

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/i18n/en-US/settings.json
  • src/renderer/src/i18n/zh-CN/settings.json
  • src/renderer/src/App.vue
  • src/renderer/src/stores/settings.ts
  • src/renderer/src/assets/style.css
src/renderer/**/*.{vue,ts,js,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

渲染进程代码放在 src/renderer

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/App.vue
  • src/renderer/src/stores/settings.ts
  • src/renderer/settings/components/DisplaySettings.vue
src/renderer/src/**/*.{vue,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)

src/renderer/src/**/*.{vue,ts,tsx,js,jsx}: Use the Composition API for better code organization and reusability
Implement proper state management with Pinia
Utilize Vue Router for navigation and route management
Leverage Vue's built-in reactivity system for efficient data handling

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/App.vue
  • src/renderer/src/stores/settings.ts
src/renderer/src/**/*.vue

📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)

Use scoped styles to prevent CSS conflicts between components

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/App.vue
src/renderer/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

src/renderer/**/*.{ts,tsx,vue}: Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
Use TypeScript for all code; prefer types over interfaces.
Avoid enums; use const objects instead.
Use arrow functions for methods and computed properties.
Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/App.vue
  • src/renderer/src/stores/settings.ts
  • src/renderer/settings/components/DisplaySettings.vue
src/renderer/**/*.{vue,ts}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

Implement lazy loading for routes and components.

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/App.vue
  • src/renderer/src/stores/settings.ts
  • src/renderer/settings/components/DisplaySettings.vue
src/renderer/**/*.{ts,vue}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

src/renderer/**/*.{ts,vue}: Use useFetch and useAsyncData for data fetching.
Implement SEO best practices using Nuxt's useHead and useSeoMeta.

Use Pinia for frontend state management (do not introduce alternative state libraries)

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/App.vue
  • src/renderer/src/stores/settings.ts
  • src/renderer/settings/components/DisplaySettings.vue
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use English for all logs and comments

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/main/presenter/llmProviderPresenter/index.ts
  • src/renderer/src/App.vue
  • src/main/presenter/configPresenter/providers.ts
  • src/renderer/src/stores/settings.ts
  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
  • src/renderer/settings/components/DisplaySettings.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Enable and adhere to strict TypeScript typing (avoid implicit any, prefer precise types)

Use PascalCase for TypeScript types and classes

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/main/presenter/llmProviderPresenter/index.ts
  • src/renderer/src/App.vue
  • src/main/presenter/configPresenter/providers.ts
  • src/renderer/src/stores/settings.ts
  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
  • src/renderer/settings/components/DisplaySettings.vue
src/renderer/{src,shell,floating}/**/*.vue

📄 CodeRabbit inference engine (CLAUDE.md)

src/renderer/{src,shell,floating}/**/*.vue: Use Vue 3 Composition API for all components
All user-facing strings must use i18n keys via vue-i18n (no hard-coded UI strings)
Use Tailwind CSS utilities and ensure styles are scoped in Vue components

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/App.vue
src/renderer/src/components/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Organize UI components by feature within src/renderer/src/

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/components/ChatInput.vue
src/renderer/src/**

📄 CodeRabbit inference engine (AGENTS.md)

Place Vue 3 app source under src/renderer/src (components, stores, views, i18n, lib)

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/i18n/en-US/settings.json
  • src/renderer/src/i18n/zh-CN/settings.json
  • src/renderer/src/App.vue
  • src/renderer/src/stores/settings.ts
  • src/renderer/src/assets/style.css
src/renderer/src/**/*.{vue,ts}

📄 CodeRabbit inference engine (AGENTS.md)

All user-facing strings must use vue-i18n ($t/keys) rather than hardcoded literals

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/App.vue
  • src/renderer/src/stores/settings.ts
**/*.{ts,tsx,js,jsx,vue,css,scss,md,json,yml,yaml}

📄 CodeRabbit inference engine (AGENTS.md)

Prettier style: single quotes, no semicolons, print width 100; run pnpm run format

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/i18n/en-US/settings.json
  • src/renderer/src/i18n/zh-CN/settings.json
  • src/main/presenter/llmProviderPresenter/index.ts
  • src/renderer/src/App.vue
  • src/main/presenter/configPresenter/providers.ts
  • src/renderer/src/stores/settings.ts
  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
  • src/renderer/src/assets/style.css
  • src/renderer/settings/components/DisplaySettings.vue
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,vue}: Use OxLint for JS/TS code; keep lint clean
Use camelCase for variables and functions
Use SCREAMING_SNAKE_CASE for constants

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/composables/useCodeFontSize.ts
  • src/renderer/src/components/ChatInput.vue
  • src/main/presenter/llmProviderPresenter/index.ts
  • src/renderer/src/App.vue
  • src/main/presenter/configPresenter/providers.ts
  • src/renderer/src/stores/settings.ts
  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
  • src/renderer/settings/components/DisplaySettings.vue
src/renderer/**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

Name Vue component files in PascalCase (e.g., ChatInput.vue)

Files:

  • src/renderer/src/components/icons/ModelIcon.vue
  • src/renderer/src/components/ChatInput.vue
  • src/renderer/src/App.vue
  • src/renderer/settings/components/DisplaySettings.vue
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development-setup.mdc)

**/*.{js,jsx,ts,tsx}: 使用 OxLint 进行代码检查
Log和注释使用英文书写

Files:

  • src/renderer/src/composables/useCodeFontSize.ts
  • src/main/presenter/llmProviderPresenter/index.ts
  • src/main/presenter/configPresenter/providers.ts
  • src/renderer/src/stores/settings.ts
  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
src/{main,renderer}/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)

src/{main,renderer}/**/*.ts: Use context isolation for improved security
Implement proper inter-process communication (IPC) patterns
Optimize application startup time with lazy loading
Implement proper error handling and logging for debugging

Files:

  • src/renderer/src/composables/useCodeFontSize.ts
  • src/main/presenter/llmProviderPresenter/index.ts
  • src/main/presenter/configPresenter/providers.ts
  • src/renderer/src/stores/settings.ts
  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/error-logging.mdc)

**/*.{ts,tsx}: 始终使用 try-catch 处理可能的错误
提供有意义的错误信息
记录详细的错误日志
优雅降级处理
日志应包含时间戳、日志级别、错误代码、错误描述、堆栈跟踪(如适用)、相关上下文信息
日志级别应包括 ERROR、WARN、INFO、DEBUG
不要吞掉错误
提供用户友好的错误信息
实现错误重试机制
避免记录敏感信息
使用结构化日志
设置适当的日志级别

Files:

  • src/renderer/src/composables/useCodeFontSize.ts
  • src/main/presenter/llmProviderPresenter/index.ts
  • src/main/presenter/configPresenter/providers.ts
  • src/renderer/src/stores/settings.ts
  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
src/renderer/src/i18n/**/*.{ts,json,yml,yaml}

📄 CodeRabbit inference engine (AGENTS.md)

Store i18n resources under src/renderer/src/i18n

Files:

  • src/renderer/src/i18n/en-US/settings.json
  • src/renderer/src/i18n/zh-CN/settings.json
src/main/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)

Use Electron's built-in APIs for file system and native dialogs

Files:

  • src/main/presenter/llmProviderPresenter/index.ts
  • src/main/presenter/configPresenter/providers.ts
  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
src/main/presenter/llmProviderPresenter/index.ts

📄 CodeRabbit inference engine (.cursor/rules/llm-agent-loop.mdc)

src/main/presenter/llmProviderPresenter/index.ts: src/main/presenter/llmProviderPresenter/index.ts should manage the overall Agent loop, conversation history, tool execution via McpPresenter, and frontend communication via eventBus.
The main Agent loop in llmProviderPresenter/index.ts should handle multi-round LLM calls and tool usage, maintaining conversation state and controlling the loop with needContinueConversation and toolCallCount.
The main Agent loop should send standardized STREAM_EVENTS (RESPONSE, END, ERROR) to the frontend via eventBus.
The main Agent loop should buffer text content, handle tool call events, format tool results for the next LLM call, and manage conversation continuation logic.

Files:

  • src/main/presenter/llmProviderPresenter/index.ts
src/main/**/*.{ts,js,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

主进程代码放在 src/main

Files:

  • src/main/presenter/llmProviderPresenter/index.ts
  • src/main/presenter/configPresenter/providers.ts
  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
src/main/presenter/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Place Electron main-process presenters under src/main/presenter/ (Window, Tab, Thread, Mcp, Config, LLMProvider)

Files:

  • src/main/presenter/llmProviderPresenter/index.ts
  • src/main/presenter/configPresenter/providers.ts
  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
src/main/presenter/configPresenter/providers.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Add provider configuration entries in src/main/presenter/configPresenter/providers.ts

Files:

  • src/main/presenter/configPresenter/providers.ts
src/renderer/src/stores/**/*.{vue,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/pinia-best-practices.mdc)

src/renderer/src/stores/**/*.{vue,ts,tsx,js,jsx}: Use modules to organize related state and actions
Implement proper state persistence for maintaining data across sessions
Use getters for computed state properties
Utilize actions for side effects and asynchronous operations
Keep the store focused on global state, not component-specific data

Files:

  • src/renderer/src/stores/settings.ts
src/main/presenter/llmProviderPresenter/providers/*.ts

📄 CodeRabbit inference engine (.cursor/rules/llm-agent-loop.mdc)

src/main/presenter/llmProviderPresenter/providers/*.ts: Each file in src/main/presenter/llmProviderPresenter/providers/*.ts should handle interaction with a specific LLM API, including request/response formatting, tool definition conversion, native/non-native tool call management, and standardizing output streams to a common event format.
Provider implementations must use a coreStream method that yields standardized stream events to decouple the main loop from provider-specific details.
The coreStream method in each Provider must perform a single streaming API request per conversation round and must not contain multi-round tool call loop logic.
Provider files should implement helper methods such as formatMessages, convertToProviderTools, parseFunctionCalls, and prepareFunctionCallPrompt as needed for provider-specific logic.
All provider implementations must parse provider-specific data chunks and yield standardized events for text, reasoning, tool calls, usage, errors, stop reasons, and image data.
When a provider does not support native function calling, it must prepare messages using prompt wrapping (e.g., prepareFunctionCallPrompt) before making the API call.
When a provider supports native function calling, MCP tools must be converted to the provider's format (e.g., using convertToProviderTools) and included in the API request.
Provider implementations should aggregate and yield usage events as part of the standardized stream.
Provider implementations should yield image data events in the standardized format when applicable.
Provider implementations should yield reasoning events in the standardized format when applicable.
Provider implementations should yield tool call events (tool_call_start, tool_call_chunk, tool_call_end) in the standardized format.
Provider implementations should yield stop events with appropriate stop_reason in the standardized format.
Provider implementations should yield error events in the standardized format...

Files:

  • src/main/presenter/llmProviderPresenter/providers/poeProvider.ts
🧠 Learnings (5)
📚 Learning: 2025-07-23T00:45:57.322Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: .cursor/rules/vue-shadcn.mdc:0-0
Timestamp: 2025-07-23T00:45:57.322Z
Learning: Applies to src/renderer/{composables,utils}/**/*.ts : Use VueUse for common composables and utility functions.

Applied to files:

  • src/renderer/src/composables/useCodeFontSize.ts
📚 Learning: 2025-09-06T03:07:23.817Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-06T03:07:23.817Z
Learning: Applies to src/main/presenter/llmProviderPresenter/providers/*.ts : New LLM providers must be added under src/main/presenter/llmProviderPresenter/providers/ as separate files

Applied to files:

  • src/main/presenter/llmProviderPresenter/index.ts
  • src/main/presenter/configPresenter/providers.ts
📚 Learning: 2025-10-14T08:02:59.495Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: AGENTS.md:0-0
Timestamp: 2025-10-14T08:02:59.495Z
Learning: Applies to src/main/presenter/LLMProvider/**/*.ts : Implement the two-layer LLM provider (Agent Loop + Provider) under src/main/presenter/LLMProvider

Applied to files:

  • src/main/presenter/llmProviderPresenter/index.ts
📚 Learning: 2025-07-23T00:45:57.322Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: .cursor/rules/vue-shadcn.mdc:0-0
Timestamp: 2025-07-23T00:45:57.322Z
Learning: Applies to src/renderer/**/*.{vue} : Use <script setup> syntax for concise component definitions.

Applied to files:

  • src/renderer/src/App.vue
📚 Learning: 2025-09-06T03:07:23.817Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-06T03:07:23.817Z
Learning: Applies to src/main/presenter/configPresenter/providers.ts : Add provider configuration entries in src/main/presenter/configPresenter/providers.ts

Applied to files:

  • src/main/presenter/configPresenter/providers.ts
🧬 Code graph analysis (2)
src/main/presenter/llmProviderPresenter/index.ts (1)
src/main/presenter/llmProviderPresenter/providers/poeProvider.ts (1)
  • PoeProvider (13-25)
src/main/presenter/llmProviderPresenter/providers/poeProvider.ts (1)
src/shared/types/presenters/legacy.presenters.d.ts (1)
  • IConfigPresenter (380-542)
🔇 Additional comments (12)
src/renderer/src/i18n/zh-CN/settings.json (1)

757-758: Nice localization coverage.

The new display.codeFontSize string slots neatly into the existing display section, keeping zh-CN in sync.

src/renderer/src/assets/style.css (1)

153-154: Clean CSS hook for code font sizing.

Defining --dc-code-font-size on html and reusing it across prose/code surfaces keeps the implementation tidy and easy to tune.

Also applies to: 984-991

src/renderer/src/stores/settings.ts (1)

20-22: Store wiring looks solid.

The separate code font size level/value, clamped persistence, and exposed updater give the composable everything it needs without disturbing existing font settings.

Also applies to: 42-43, 240-242, 326-331, 664-669, 1781-1796

src/renderer/src/components/ChatInput.vue (1)

3-3: Full-width adjustment achieved.

Dropping the max-width/margin classes delivers the requested full-width chat area cleanly.

src/renderer/src/components/icons/ModelIcon.vue (1)

47-47: Icon mapping complete.

Importing poe-color.svg and registering the key ensures Poe providers render with the right badge.

Also applies to: 123-124

src/renderer/src/App.vue (1)

21-37: Good call initializing the composable.

Calling useCodeFontSize() in setup keeps the CSS variable in sync as soon as the app boots.

src/main/presenter/configPresenter/providers.ts (1)

203-216: Provider config fits right in.

The Poe defaults mirror other OpenAI-compatible entries and surface helpful docs/URL metadata.

src/main/presenter/llmProviderPresenter/index.ts (1)

50-51: Presenter wiring looks correct.

Importing PoeProvider and handling both id and apiType switch paths covers every instantiation scenario.

Also applies to: 216-217, 270-271

src/renderer/src/i18n/en-US/settings.json (1)

757-757: LGTM! Translation key follows existing patterns.

The new codeFontSize key is well-named, properly placed under the display object, and supports the internationalization requirements.

src/renderer/settings/components/DisplaySettings.vue (2)

215-237: LGTM! UI implementation follows existing patterns.

The code font size settings block correctly mirrors the font size settings structure and properly integrates with the settings store. The use of raw pixel values ('12px', '14px', etc.) instead of i18n keys is acceptable here since these are technical measurements rather than user-facing prose.


436-442: LGTM! Computed property correctly integrates with the settings store.

The code font size level computed property follows the same pattern as the font size level above it, properly delegating to the store's updateCodeFontSizeLevel method.

src/main/presenter/llmProviderPresenter/providers/poeProvider.ts (1)

1-25: LGTM! Clean provider implementation that correctly reuses OpenAI-compatible base.

The PoeProvider appropriately extends OpenAICompatibleProvider and only customizes the model group metadata for UI presentation. This minimal approach is correct since Poe exposes an OpenAI-compatible API. The JSDoc clearly explains the provider's purpose and design rationale.

@zerob13
Copy link
Collaborator

zerob13 commented Oct 20, 2025

Sorry, we’re not planning to add a code font size setting in the preferences for now — this functionality is already handled by the upstream Markdown library. Likewise, we don’t intend to change the chat window width or related layout options at this time, as we prefer to keep the current design.

Before submitting a PR, please make sure to sync with the latest code to avoid conflicts.

This PR will be closed, but we still appreciate your contribution.

@zerob13 zerob13 closed this Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants