CallMeDaniel Claude Opus 4.6 (1M context) commited on
Commit
972271d
·
1 Parent(s): c6d6021

feat: remove mock/claude backends, default to gemini, add openai toggle

Browse files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files changed (2) hide show
  1. server/routes.py +2 -2
  2. web/index.html +4 -6
server/routes.py CHANGED
@@ -34,14 +34,14 @@ class ChatRequest(BaseModel):
34
  message: str = Field(..., min_length=1)
35
  history: list[ChatMessage] = Field(default_factory=list)
36
  mentions: list[str] = Field(default_factory=list)
37
- backend: str = "mock"
38
  design_state: dict = Field(default_factory=dict)
39
 
40
 
41
  class ReportRequest(BaseModel):
42
  part_name: str = "part"
43
  history: list[ChatMessage] = Field(default_factory=list)
44
- backend: str = "mock"
45
 
46
 
47
  # ── Endpoints ──────────────────────────────────────────────────────────────
 
34
  message: str = Field(..., min_length=1)
35
  history: list[ChatMessage] = Field(default_factory=list)
36
  mentions: list[str] = Field(default_factory=list)
37
+ backend: str = "gemini"
38
  design_state: dict = Field(default_factory=dict)
39
 
40
 
41
  class ReportRequest(BaseModel):
42
  part_name: str = "part"
43
  history: list[ChatMessage] = Field(default_factory=list)
44
+ backend: str = "gemini"
45
 
46
 
47
  # ── Endpoints ──────────────────────────────────────────────────────────────
web/index.html CHANGED
@@ -1087,9 +1087,8 @@
1087
  </div>
1088
  <div class="topbar-right">
1089
  <div class="backend-toggle">
1090
- <button id="btn-mock" class="active" onclick="setBackend('mock')">MOCK</button>
1091
- <button id="btn-gemini" onclick="setBackend('gemini')">GEMINI</button>
1092
- <button id="btn-claude" onclick="setBackend('anthropic')">CLAUDE</button>
1093
  </div>
1094
  <button class="gallery-btn" onclick="openGallery()">
1095
  <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
@@ -1243,7 +1242,7 @@
1243
  <script>
1244
  // ── STATE ─────────────────────────────────────────────
1245
 
1246
- let currentBackend = 'mock';
1247
  let chatHistory = [];
1248
  let designState = {};
1249
  let chatPanelOpen = true;
@@ -1434,9 +1433,8 @@ function loadSTL(url) {
1434
 
1435
  function setBackend(name) {
1436
  currentBackend = name;
1437
- document.getElementById('btn-mock').classList.toggle('active', name === 'mock');
1438
  document.getElementById('btn-gemini').classList.toggle('active', name === 'gemini');
1439
- document.getElementById('btn-claude').classList.toggle('active', name === 'anthropic');
1440
  }
1441
 
1442
  // ── CHAT PANEL TOGGLE ─────────────────────────────────
 
1087
  </div>
1088
  <div class="topbar-right">
1089
  <div class="backend-toggle">
1090
+ <button id="btn-gemini" class="active" onclick="setBackend('gemini')">GEMINI</button>
1091
+ <button id="btn-openai" onclick="setBackend('openai')">OPENAI</button>
 
1092
  </div>
1093
  <button class="gallery-btn" onclick="openGallery()">
1094
  <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
 
1242
  <script>
1243
  // ── STATE ─────────────────────────────────────────────
1244
 
1245
+ let currentBackend = 'gemini';
1246
  let chatHistory = [];
1247
  let designState = {};
1248
  let chatPanelOpen = true;
 
1433
 
1434
  function setBackend(name) {
1435
  currentBackend = name;
 
1436
  document.getElementById('btn-gemini').classList.toggle('active', name === 'gemini');
1437
+ document.getElementById('btn-openai').classList.toggle('active', name === 'openai');
1438
  }
1439
 
1440
  // ── CHAT PANEL TOGGLE ─────────────────────────────────