Fix combo modal

This commit is contained in:
decolua
2026-04-09 10:16:11 +07:00
parent 507a5dbfea
commit 39545cf4c8
7 changed files with 16 additions and 13 deletions
+2 -1
View File
@@ -144,9 +144,10 @@ export const PROVIDER_MODELS = {
],
oc: [ // OpenCode
{ id: "nemotron-3-super-free", name: "Nemotron 3 Super" },
{ id: "qwen3.6-plus-free", name: "Qwen 3.6 Plus" },
// { id: "qwen3.6-plus-free", name: "Qwen 3.6 Plus" },
// { id: "big-pickle", name: "Big Pickle", targetFormat: "claude" },
{ id: "minimax-m2.5-free", name: "MiniMax M2.5", targetFormat: "claude" },
// { id: "trinity-large-preview-free", name: "Trinity Large Preview" },
],
cl: [ // Cline
+1 -1
View File
@@ -33,7 +33,6 @@ export const PROVIDERS = {
claude: {
baseUrl: "https://api.anthropic.com/v1/messages",
format: "claude",
retry: { 429: 0 },
headers: {
"Anthropic-Version": "2023-06-01",
"Anthropic-Beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,context-management-2025-06-27,prompt-caching-scope-2026-01-05,advanced-tool-use-2025-11-20,effort-2025-11-24,structured-outputs-2025-12-15,fast-mode-2026-02-01,redact-thinking-2026-02-12,token-efficient-tools-2026-03-28",
@@ -179,6 +178,7 @@ export const PROVIDERS = {
kiro: {
baseUrl: "https://codewhisperer.us-east-1.amazonaws.com/generateAssistantResponse",
format: "kiro",
retry: { 429: 2 },
headers: {
"Content-Type": "application/json",
"Accept": "application/vnd.amazon.eventstream",
+3 -3
View File
@@ -68,9 +68,9 @@ export const RETRY_CONFIG = {
// Default retry config by status code (number of retry attempts)
export const DEFAULT_RETRY_CONFIG = {
429: 2, // Rate limit - retry 2 times
503: 0, // Service unavailable - no retry
502: 0 // Bad gateway - no retry
429: 0, // Rate limit - no retry, use account fallback instead
503: 1, // Service unavailable - retry 1 time (transient)
502: 1 // Bad gateway - retry 1 time (transient)
};
// Exponential backoff config for rate limits
+2 -2
View File
@@ -448,7 +448,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) {
<p className="text-xs text-text-muted">No models added yet</p>
</div>
) : (
<div className="flex flex-col gap-1 max-h-[200px] overflow-y-auto">
<div className="flex flex-col gap-1 max-h-[350px] overflow-y-auto">
{models.map((model, index) => (
<ModelItem
key={index}
@@ -472,7 +472,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) {
{/* Add Model button */}
<button
onClick={() => setShowModelSelect(true)}
className="w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-text-muted hover:text-primary hover:border-primary/30 transition-colors flex items-center justify-center gap-1"
className="w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1"
>
<span className="material-symbols-outlined text-[16px]">add</span>
Add Model
+5 -3
View File
@@ -11,15 +11,17 @@ const IS_WINDOWS = os.platform() === "win32";
const BIN_NAME = IS_WINDOWS ? `${BINARY_NAME}.exe` : BINARY_NAME;
const BIN_PATH = path.join(BIN_DIR, BIN_NAME);
const GITHUB_BASE_URL = "https://github.com/cloudflare/cloudflared/releases/latest/download";
const CLOUDFLARED_VERSION = "2026.3.0";
const GITHUB_BASE_URL = `https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}`;
const PLATFORM_MAPPINGS = {
darwin: {
x64: "cloudflared-darwin-amd64.tgz",
arm64: "cloudflared-darwin-amd64.tgz"
arm64: "cloudflared-darwin-arm64.tgz"
},
win32: {
x64: "cloudflared-windows-amd64.exe"
x64: "cloudflared-windows-amd64.exe",
x32: "cloudflared-windows-386.exe"
},
linux: {
x64: "cloudflared-linux-amd64",
+2 -2
View File
@@ -69,7 +69,7 @@ export default function Modal({
>
{/* Header */}
{(title || showCloseButton) && (
<div className="flex items-center justify-between p-6 border-b border-black/5 dark:border-white/5">
<div className="flex items-center justify-between p-2 border-b border-black/5 dark:border-white/5">
<div className="flex items-center">
<div className="flex items-center gap-2 mr-4">
<div className="w-3 h-3 rounded-full bg-[#FF5F56]" />
@@ -94,7 +94,7 @@ export default function Modal({
)}
{/* Body */}
<div className="p-6 max-h-[calc(80vh-140px)] overflow-y-auto">{children}</div>
<div className="p-6 max-h-[calc(85vh-100px)] overflow-y-auto">{children}</div>
{/* Footer */}
{footer && (
+1 -1
View File
@@ -249,7 +249,7 @@ export default function ModelSelectModal({
</div>
{/* Models grouped by provider - compact */}
<div className="max-h-[300px] overflow-y-auto space-y-3">
<div className="max-h-[400px] overflow-y-auto space-y-3">
{/* Combos section - always first */}
{filteredCombos.length > 0 && (
<div>