Skip to content

Commit 1a90aa7

Browse files
committed
feat: Add model logos to selector and enhance styling for improved UX
1 parent ae41723 commit 1a90aa7

File tree

3 files changed

+62
-5
lines changed

3 files changed

+62
-5
lines changed

index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,15 @@ <h3>EXPLORER</h3>
142142
</span>
143143
<span class="separator"></span>
144144
<span class="info-item">
145-
<!-- <span class="material-symbols-outlined">smart_toy</span> -->
145+
<div class="model-logos" id="modelLogos" aria-hidden="true">
146+
<img src="public/gemini.png" alt="Gemini" data-model="gemini" class="model-logo" />
147+
<img src="public/gpt.png" alt="GPT" data-model="gpt" class="model-logo" />
148+
<img src="public/claude.png" alt="Claude" data-model="claude" class="model-logo" />
149+
</div>
146150
<select id="modelSelector" title="Choose AI model format - optimizes output structure for each AI">
151+
<option value="gemini" title="Hybrid format with metadata">Gemini (Hybrid)</option>
147152
<option value="gpt" title="Markdown format with clear code blocks">GPT-4 (Markdown)</option>
148153
<option value="claude" title="XML format with structured context">Claude (XML)</option>
149-
<option value="gemini" title="Hybrid format with metadata">Gemini (Hybrid)</option>
150154
</select>
151155
</span>
152156
</div>

index.js

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ Your goal: deliver precise, production-grade patches with the smallest necessary
14941494
const parts = [];
14951495
// === AI Model Template Logic ===
14961496
if (S.model === 'gpt') {
1497-
parts.push('# 🤖 PROJECT CONTEXT FOR GPT-4\n');
1497+
parts.push('# <span class="material-symbols-outlined">smart_toy</span> PROJECT CONTEXT FOR GPT-4\n');
14981498
parts.push('='.repeat(80) + '\n\n');
14991499

15001500
parts.push('## 📋 METADATA\n');
@@ -1683,7 +1683,7 @@ Your goal: deliver precise, production-grade patches with the smallest necessary
16831683

16841684
// Add model-specific headers for download
16851685
if (S.model === 'gpt') {
1686-
parts.push('# 🤖 PROJECT CONTEXT FOR GPT-4\n');
1686+
parts.push('# <span class="material-symbols-outlined">smart_toy</span> PROJECT CONTEXT FOR GPT-4\n');
16871687
parts.push('='.repeat(80) + '\n\n');
16881688

16891689
parts.push('## 📋 METADATA\n');
@@ -1976,14 +1976,40 @@ Your goal: deliver precise, production-grade patches with the smallest necessary
19761976
S.model = D.model.value;
19771977
const templates = {
19781978
gpt: '📝 GPT-4: Markdown format with clear code blocks and instructions',
1979-
claude: '🤖 Claude: XML-structured context with semantic tags for better understanding',
1979+
claude: 'Claude: XML-structured context with semantic tags for better understanding',
19801980
gemini: '✨ Gemini: Hybrid format with metadata and organized sections'
19811981
};
1982+
// highlight corresponding logo if present
1983+
try {
1984+
const logos = document.querySelectorAll('.model-logo');
1985+
logos.forEach(l => l.classList.toggle('selected', l.dataset.model === S.model));
1986+
} catch (e) { /* ignore */ }
19821987
console.log(`%c${templates[S.model]}`, 'color:#10b981;font-weight:bold');
19831988
toast(`Template: ${S.model.toUpperCase()}`, 'info');
19841989
});
1990+
1991+
// helper exposed to window so inline markup can use it
1992+
window.selectModel = m => {
1993+
if (!D.model) return;
1994+
D.model.value = m;
1995+
D.model.dispatchEvent(new Event('change'));
1996+
};
19851997
}
19861998

1999+
// wire model-logo clicks and initial highlight (if the inline images are present)
2000+
try {
2001+
const logos = document.querySelectorAll('.model-logo');
2002+
logos.forEach(img => {
2003+
img.addEventListener('click', () => {
2004+
const m = img.dataset.model;
2005+
if (m && window.selectModel) window.selectModel(m);
2006+
});
2007+
});
2008+
// initial highlight based on select value or state
2009+
const initial = D.model ? D.model.value : S.model;
2010+
logos.forEach(l => l.classList.toggle('selected', l.dataset.model === initial));
2011+
} catch (e) { /* ignore if DOM not ready */ }
2012+
19872013
// Drag and Drop functionality on main content area
19882014
const dragDropZone = $('dragDropZone');
19892015
const dragDropOverlay = $('dragDropOverlay');

style.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,33 @@
2222
border-color: #fbbf24;
2323
box-shadow: 0 0 0 3px rgba(251,187,36,0.08);
2424
}
25+
/* Model logo strip next to the selector */
26+
.model-logos {
27+
display: inline-flex;
28+
align-items: center;
29+
gap: 6px;
30+
margin-right: 8px;
31+
}
32+
.model-logo {
33+
width: 24px;
34+
height: 24px;
35+
object-fit: contain;
36+
border-radius: 4px;
37+
cursor: pointer;
38+
opacity: 0.85;
39+
transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
40+
border: 1px solid transparent;
41+
background: rgba(255,255,255,0.02);
42+
}
43+
.model-logo:hover {
44+
transform: translateY(-2px) scale(1.02);
45+
opacity: 1;
46+
}
47+
.model-logo.selected {
48+
box-shadow: 0 0 0 3px rgba(16,185,129,0.08);
49+
border-color: rgba(16,185,129,0.18);
50+
opacity: 1;
51+
}
2552
/* Only sidebar main action icons (Select Directory, Create Context) black and small */
2653
.sidebar-btn-icon {
2754
width: 20px;

0 commit comments

Comments
 (0)