mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 17:01:02 +00:00
Add ANSI-aware word wrapping to TUI components
- Created shared wrapTextWithAnsi() function in utils.ts - Handles word-based wrapping while preserving ANSI escape codes - Properly tracks active ANSI codes across wrapped lines - Supports multi-byte characters (emoji, surrogate pairs) - Updated Markdown and Text components to use shared wrapping - Removed duplicate wrapping logic (158 lines total)
This commit is contained in:
parent
22d8a0ae4a
commit
38ac29acfb
5 changed files with 389 additions and 278 deletions
|
|
@ -380,27 +380,6 @@ async function generateModels() {
|
|||
});
|
||||
}
|
||||
|
||||
// Add Gemini 3
|
||||
if (!allModels.some(m => m.provider === "google" && m.id === "gemini-3-pro-preview")) {
|
||||
allModels.push({
|
||||
id: "gemini-3-pro-preview",
|
||||
name: "Gemini 3 Pro Preview",
|
||||
api: "google-generative-ai",
|
||||
provider: "google",
|
||||
baseUrl: "https://generativelanguage.googleapis.com/v1beta",
|
||||
reasoning: true,
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 1.25,
|
||||
output: 10,
|
||||
cacheRead: 0.31,
|
||||
cacheWrite: 0,
|
||||
},
|
||||
contextWindow: 1048576,
|
||||
maxTokens: 65536,
|
||||
});
|
||||
}
|
||||
|
||||
// Group by provider and deduplicate by model ID
|
||||
const providers: Record<string, Record<string, Model<any>>> = {};
|
||||
for (const model of allModels) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue