Skip to content

Commit 6dde62e

Browse files
committed
fix: reload local skills from toolbar
1 parent 056a517 commit 6dde62e

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

Sources/CodexSkillManager/Skills/Sidebar/SkillListView.swift

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,20 @@ struct SkillListView: View {
5454
}
5555
.listStyle(.sidebar)
5656
.toolbar {
57-
if source == .clawdhub {
58-
ToolbarItem(placement: .primaryAction) {
59-
Button {
60-
Task { await remoteStore.loadLatest() }
61-
} label: {
62-
Label("Reload", systemImage: "arrow.clockwise")
57+
ToolbarItem(placement: .primaryAction) {
58+
Button {
59+
Task {
60+
switch source {
61+
case .local:
62+
await store.loadSkills()
63+
case .clawdhub:
64+
await remoteStore.loadLatest()
65+
}
6366
}
64-
.labelStyle(.iconOnly)
67+
} label: {
68+
Label("Reload", systemImage: "arrow.clockwise")
6569
}
70+
.labelStyle(.iconOnly)
6671
}
6772
}
6873
}

0 commit comments

Comments
 (0)