@geminilight/mindos 0.5.28 → 0.5.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/app/app/api/update/route.ts +41 -0
  2. package/app/app/explore/page.tsx +12 -0
  3. package/app/components/ActivityBar.tsx +14 -7
  4. package/app/components/GuideCard.tsx +21 -7
  5. package/app/components/HomeContent.tsx +31 -97
  6. package/app/components/KeyboardShortcuts.tsx +102 -0
  7. package/app/components/Panel.tsx +12 -7
  8. package/app/components/SidebarLayout.tsx +21 -1
  9. package/app/components/UpdateBanner.tsx +19 -21
  10. package/app/components/explore/ExploreContent.tsx +100 -0
  11. package/app/components/explore/UseCaseCard.tsx +50 -0
  12. package/app/components/explore/use-cases.ts +30 -0
  13. package/app/components/panels/AgentsPanel.tsx +268 -131
  14. package/app/components/panels/PluginsPanel.tsx +87 -27
  15. package/app/components/settings/AiTab.tsx +5 -3
  16. package/app/components/settings/McpSkillsSection.tsx +12 -0
  17. package/app/components/settings/McpTab.tsx +28 -30
  18. package/app/components/settings/SettingsContent.tsx +5 -2
  19. package/app/components/settings/UpdateTab.tsx +195 -0
  20. package/app/components/settings/types.ts +1 -1
  21. package/app/components/walkthrough/WalkthroughOverlay.tsx +224 -0
  22. package/app/components/walkthrough/WalkthroughProvider.tsx +133 -0
  23. package/app/components/walkthrough/WalkthroughTooltip.tsx +129 -0
  24. package/app/components/walkthrough/index.ts +3 -0
  25. package/app/components/walkthrough/steps.ts +21 -0
  26. package/app/hooks/useMcpData.tsx +166 -0
  27. package/app/lib/i18n-en.ts +182 -5
  28. package/app/lib/i18n-zh.ts +181 -4
  29. package/app/lib/mcp-snippets.ts +103 -0
  30. package/app/lib/settings.ts +4 -0
  31. package/app/next-env.d.ts +1 -1
  32. package/app/package.json +1 -0
  33. package/package.json +1 -1
  34. package/app/components/settings/McpServerStatus.tsx +0 -274
@@ -0,0 +1,100 @@
1
+ 'use client';
2
+
3
+ import { useState } from 'react';
4
+ import { useLocale } from '@/lib/LocaleContext';
5
+ import { useCases, categories, type UseCaseCategory } from './use-cases';
6
+ import UseCaseCard from './UseCaseCard';
7
+
8
+ export default function ExploreContent() {
9
+ const { t } = useLocale();
10
+ const e = t.explore;
11
+ const [activeCategory, setActiveCategory] = useState<UseCaseCategory | 'all'>('all');
12
+
13
+ const filtered = activeCategory === 'all'
14
+ ? useCases
15
+ : useCases.filter(uc => uc.category === activeCategory);
16
+
17
+ /** Type-safe lookup for use case i18n data by id */
18
+ const getUseCaseText = (id: string): { title: string; desc: string; prompt: string } | undefined => {
19
+ const map: Record<string, { title: string; desc: string; prompt: string }> = {
20
+ c1: e.c1, c2: e.c2, c3: e.c3, c4: e.c4, c5: e.c5,
21
+ c6: e.c6, c7: e.c7, c8: e.c8, c9: e.c9,
22
+ };
23
+ return map[id];
24
+ };
25
+
26
+ return (
27
+ <div className="content-width px-4 md:px-6 py-8 md:py-12">
28
+ {/* Header */}
29
+ <div className="mb-8">
30
+ <div className="flex items-center gap-2 mb-3">
31
+ <div className="w-1 h-5 rounded-full" style={{ background: 'var(--amber)' }} />
32
+ <h1
33
+ className="text-2xl font-semibold tracking-tight font-display"
34
+ style={{ color: 'var(--foreground)' }}
35
+ >
36
+ {e.title}
37
+ </h1>
38
+ </div>
39
+ <p
40
+ className="text-sm leading-relaxed"
41
+ style={{ color: 'var(--muted-foreground)', paddingLeft: '1rem' }}
42
+ >
43
+ {e.subtitle}
44
+ </p>
45
+ </div>
46
+
47
+ {/* Category tabs */}
48
+ <div className="flex flex-wrap gap-2 mb-6" style={{ paddingLeft: '1rem' }}>
49
+ <CategoryChip
50
+ label={e.all}
51
+ active={activeCategory === 'all'}
52
+ onClick={() => setActiveCategory('all')}
53
+ />
54
+ {categories.map(cat => (
55
+ <CategoryChip
56
+ key={cat}
57
+ label={(e.categories as Record<string, string>)[cat]}
58
+ active={activeCategory === cat}
59
+ onClick={() => setActiveCategory(cat)}
60
+ />
61
+ ))}
62
+ </div>
63
+
64
+ {/* Card grid */}
65
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3" style={{ paddingLeft: '1rem' }}>
66
+ {filtered.map(uc => {
67
+ const data = getUseCaseText(uc.id);
68
+ if (!data) return null;
69
+ return (
70
+ <UseCaseCard
71
+ key={uc.id}
72
+ icon={uc.icon}
73
+ title={data.title}
74
+ description={data.desc}
75
+ prompt={data.prompt}
76
+ tryItLabel={e.tryIt}
77
+ />
78
+ );
79
+ })}
80
+ </div>
81
+ </div>
82
+ );
83
+ }
84
+
85
+ function CategoryChip({ label, active, onClick }: { label: string; active: boolean; onClick: () => void }) {
86
+ return (
87
+ <button
88
+ onClick={onClick}
89
+ className={`
90
+ px-3 py-1.5 rounded-full text-xs font-medium transition-all duration-150
91
+ ${active
92
+ ? 'text-[var(--amber)] bg-[var(--amber-dim)]'
93
+ : 'text-[var(--muted-foreground)] bg-[var(--muted)] hover:text-[var(--foreground)] hover:bg-[var(--muted)]/80'
94
+ }
95
+ `}
96
+ >
97
+ {label}
98
+ </button>
99
+ );
100
+ }
@@ -0,0 +1,50 @@
1
+ 'use client';
2
+
3
+ import { openAskModal } from '@/hooks/useAskModal';
4
+
5
+ interface UseCaseCardProps {
6
+ icon: string;
7
+ title: string;
8
+ description: string;
9
+ prompt: string;
10
+ tryItLabel: string;
11
+ }
12
+
13
+ export default function UseCaseCard({ icon, title, description, prompt, tryItLabel }: UseCaseCardProps) {
14
+ return (
15
+ <div
16
+ className="group flex flex-col gap-3 p-4 rounded-xl border transition-all duration-150 hover:border-amber-500/30 hover:bg-muted/50"
17
+ style={{ borderColor: 'var(--border)', background: 'var(--card)' }}
18
+ >
19
+ <div className="flex items-start gap-3">
20
+ <span className="text-xl leading-none shrink-0 mt-0.5" suppressHydrationWarning>
21
+ {icon}
22
+ </span>
23
+ <div className="flex-1 min-w-0">
24
+ <h3
25
+ className="text-sm font-semibold font-display truncate"
26
+ style={{ color: 'var(--foreground)' }}
27
+ >
28
+ {title}
29
+ </h3>
30
+ <p
31
+ className="text-xs leading-relaxed mt-1 line-clamp-2"
32
+ style={{ color: 'var(--muted-foreground)' }}
33
+ >
34
+ {description}
35
+ </p>
36
+ </div>
37
+ </div>
38
+ <button
39
+ onClick={() => openAskModal(prompt, 'user')}
40
+ className="self-start inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all duration-150 hover:opacity-80 cursor-pointer"
41
+ style={{
42
+ background: 'var(--amber-dim)',
43
+ color: 'var(--amber)',
44
+ }}
45
+ >
46
+ {tryItLabel} →
47
+ </button>
48
+ </div>
49
+ );
50
+ }
@@ -0,0 +1,30 @@
1
+ export type UseCaseCategory = 'getting-started' | 'cross-agent' | 'knowledge-evolution' | 'advanced';
2
+
3
+ export interface UseCase {
4
+ id: string;
5
+ icon: string;
6
+ category: UseCaseCategory;
7
+ }
8
+
9
+ /**
10
+ * C1-C9 use case definitions.
11
+ * All display text (title, description, prompt) comes from i18n — this file is structure only.
12
+ */
13
+ export const useCases: UseCase[] = [
14
+ { id: 'c1', icon: '👤', category: 'getting-started' },
15
+ { id: 'c2', icon: '📥', category: 'getting-started' },
16
+ { id: 'c3', icon: '🔄', category: 'cross-agent' },
17
+ { id: 'c4', icon: '🔁', category: 'knowledge-evolution' },
18
+ { id: 'c5', icon: '💡', category: 'cross-agent' },
19
+ { id: 'c6', icon: '🚀', category: 'cross-agent' },
20
+ { id: 'c7', icon: '🔍', category: 'knowledge-evolution' },
21
+ { id: 'c8', icon: '🤝', category: 'knowledge-evolution' },
22
+ { id: 'c9', icon: '🛡️', category: 'advanced' },
23
+ ];
24
+
25
+ export const categories: UseCaseCategory[] = [
26
+ 'getting-started',
27
+ 'cross-agent',
28
+ 'knowledge-evolution',
29
+ 'advanced',
30
+ ];