Skip to content

Commit e3a0d67

Browse files
committed
feat: add provider icons and system icons to menus, improve UI consistency
- Add provider asset icons (ChatGPT/Claude/Gemini) to menu items in ProjectsListView - Add system icons (terminal, network) to menu submenus - Fix sticky header interaction in ConversationTimelineView (move gesture handlers to inner content) - Improve menu item consistency with assetImage parameter support
1 parent 46789b2 commit e3a0d67

2 files changed

Lines changed: 25 additions & 8 deletions

File tree

views/ConversationTimelineView.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,17 @@ struct ConversationTimelineView: View {
9292
isActive: isActive,
9393
extraLineHeight: extraLineHeight
9494
)
95+
.contentShape(Rectangle())
96+
.onTapGesture {
97+
withAnimation(.easeInOut(duration: 0.2)) {
98+
proxy.scrollTo(stickyTurnID, anchor: .top)
99+
}
100+
}
101+
.hoverHand()
95102
Spacer(minLength: 0)
96103
}
97104
.padding(.leading, 12)
98105
.padding(.top, topPadding)
99-
.contentShape(Rectangle())
100-
.onTapGesture {
101-
withAnimation(.easeInOut(duration: 0.2)) {
102-
proxy.scrollTo(stickyTurnID, anchor: .top)
103-
}
104-
}
105-
.hoverHand()
106106
}
107107
}
108108
}

views/ProjectsListView.swift

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,22 @@ private struct ProjectTreeNodeView: View {
579579
}
580580
}
581581

582+
func providerAssetIcon(_ source: ProjectSessionSource) -> String {
583+
switch source {
584+
case .codex: return "ChatGPTIcon"
585+
case .claude: return "ClaudeIcon"
586+
case .gemini: return "GeminiIcon"
587+
}
588+
}
589+
590+
func assetIconForSessionSource(_ source: SessionSource) -> String {
591+
switch source.baseKind {
592+
case .codex: return "ChatGPTIcon"
593+
case .claude: return "ClaudeIcon"
594+
case .gemini: return "GeminiIcon"
595+
}
596+
}
597+
582598
var menuItems: [SplitMenuItem] = []
583599
for base in requestedOrder where allowed.contains(base) {
584600
var providerItems = launchItems(for: base.sessionSource)
@@ -596,7 +612,7 @@ private struct ProjectTreeNodeView: View {
596612
menuItems.append(
597613
SplitMenuItem(
598614
id: "provider-\(base.rawValue)",
599-
kind: .submenu(title: base.displayName, items: providerItems)
615+
kind: .submenu(title: base.displayName, assetImage: providerAssetIcon(base), items: providerItems)
600616
))
601617
}
602618

@@ -607,6 +623,7 @@ private struct ProjectTreeNodeView: View {
607623
id: "fallback-\(sourceKey(fallbackSource))",
608624
kind: .submenu(
609625
title: fallbackSource.branding.displayName,
626+
assetImage: assetIconForSessionSource(fallbackSource),
610627
items: launchItems(for: fallbackSource)
611628
)))
612629
}

0 commit comments

Comments
 (0)