@orderful/droid 0.15.0 → 0.16.0
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.
- package/.claude/CLAUDE.md +19 -1
- package/CHANGELOG.md +13 -0
- package/dist/bin/droid.js +8 -8
- package/dist/bin/droid.js.map +1 -1
- package/dist/commands/config.js +1 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/install.js +3 -3
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +3 -3
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skills.js +4 -4
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/tui/components/Badge.d.ts +13 -0
- package/dist/commands/tui/components/Badge.d.ts.map +1 -0
- package/dist/commands/tui/components/Badge.js +29 -0
- package/dist/commands/tui/components/Badge.js.map +1 -0
- package/dist/commands/tui/components/Markdown.d.ts +5 -0
- package/dist/commands/tui/components/Markdown.d.ts.map +1 -0
- package/dist/commands/tui/components/Markdown.js +42 -0
- package/dist/commands/tui/components/Markdown.js.map +1 -0
- package/dist/commands/tui/components/SettingsDetails.d.ts +5 -0
- package/dist/commands/tui/components/SettingsDetails.d.ts.map +1 -0
- package/dist/commands/tui/components/SettingsDetails.js +11 -0
- package/dist/commands/tui/components/SettingsDetails.js.map +1 -0
- package/dist/commands/tui/components/TabBar.d.ts +10 -0
- package/dist/commands/tui/components/TabBar.d.ts.map +1 -0
- package/dist/commands/tui/components/TabBar.js +7 -0
- package/dist/commands/tui/components/TabBar.js.map +1 -0
- package/dist/commands/tui/components/ToolDetails.d.ts +8 -0
- package/dist/commands/tui/components/ToolDetails.d.ts.map +1 -0
- package/dist/commands/tui/components/ToolDetails.js +35 -0
- package/dist/commands/tui/components/ToolDetails.js.map +1 -0
- package/dist/commands/tui/components/ToolItem.d.ts +9 -0
- package/dist/commands/tui/components/ToolItem.d.ts.map +1 -0
- package/dist/commands/tui/components/ToolItem.js +11 -0
- package/dist/commands/tui/components/ToolItem.js.map +1 -0
- package/dist/commands/tui/constants.d.ts +16 -0
- package/dist/commands/tui/constants.d.ts.map +1 -0
- package/dist/commands/tui/constants.js +17 -0
- package/dist/commands/tui/constants.js.map +1 -0
- package/dist/commands/tui/hooks/useAppUpdate.d.ts +13 -0
- package/dist/commands/tui/hooks/useAppUpdate.d.ts.map +1 -0
- package/dist/commands/tui/hooks/useAppUpdate.js +52 -0
- package/dist/commands/tui/hooks/useAppUpdate.js.map +1 -0
- package/dist/commands/tui/hooks/useToolUpdates.d.ts +22 -0
- package/dist/commands/tui/hooks/useToolUpdates.d.ts.map +1 -0
- package/dist/commands/tui/hooks/useToolUpdates.js +77 -0
- package/dist/commands/tui/hooks/useToolUpdates.js.map +1 -0
- package/dist/commands/tui/types.d.ts +5 -0
- package/dist/commands/tui/types.d.ts.map +1 -0
- package/dist/commands/tui/types.js +2 -0
- package/dist/commands/tui/types.js.map +1 -0
- package/dist/commands/tui/views/ReadmeViewer.d.ts +7 -0
- package/dist/commands/tui/views/ReadmeViewer.d.ts.map +1 -0
- package/dist/commands/tui/views/ReadmeViewer.js +56 -0
- package/dist/commands/tui/views/ReadmeViewer.js.map +1 -0
- package/dist/commands/tui/views/SetupScreen.d.ts +8 -0
- package/dist/commands/tui/views/SetupScreen.d.ts.map +1 -0
- package/dist/commands/tui/views/SetupScreen.js +114 -0
- package/dist/commands/tui/views/SetupScreen.js.map +1 -0
- package/dist/commands/tui/views/SkillConfigScreen.d.ts +8 -0
- package/dist/commands/tui/views/SkillConfigScreen.d.ts.map +1 -0
- package/dist/commands/tui/views/SkillConfigScreen.js +148 -0
- package/dist/commands/tui/views/SkillConfigScreen.js.map +1 -0
- package/dist/commands/tui/views/ToolExplorer.d.ts +8 -0
- package/dist/commands/tui/views/ToolExplorer.d.ts.map +1 -0
- package/dist/commands/tui/views/ToolExplorer.js +86 -0
- package/dist/commands/tui/views/ToolExplorer.js.map +1 -0
- package/dist/commands/tui/views/ToolUpdatePrompt.d.ts +10 -0
- package/dist/commands/tui/views/ToolUpdatePrompt.d.ts.map +1 -0
- package/dist/commands/tui/views/ToolUpdatePrompt.js +38 -0
- package/dist/commands/tui/views/ToolUpdatePrompt.js.map +1 -0
- package/dist/commands/tui/views/WelcomeScreen.d.ts +11 -0
- package/dist/commands/tui/views/WelcomeScreen.d.ts.map +1 -0
- package/dist/commands/tui/views/WelcomeScreen.js +46 -0
- package/dist/commands/tui/views/WelcomeScreen.js.map +1 -0
- package/dist/commands/tui.d.ts.map +1 -1
- package/dist/commands/tui.js +54 -755
- package/dist/commands/tui.js.map +1 -1
- package/dist/commands/uninstall.js +2 -2
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +1 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/agents.d.ts +1 -1
- package/dist/lib/agents.d.ts.map +1 -1
- package/dist/lib/agents.js +4 -4
- package/dist/lib/agents.js.map +1 -1
- package/dist/lib/config.d.ts +1 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +1 -1
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/platforms.d.ts +1 -1
- package/dist/lib/platforms.d.ts.map +1 -1
- package/dist/lib/platforms.js +1 -1
- package/dist/lib/platforms.js.map +1 -1
- package/dist/lib/skill-config.d.ts +1 -1
- package/dist/lib/skill-config.d.ts.map +1 -1
- package/dist/lib/skill-config.js +2 -2
- package/dist/lib/skill-config.js.map +1 -1
- package/dist/lib/skills.d.ts +1 -1
- package/dist/lib/skills.d.ts.map +1 -1
- package/dist/lib/skills.js +5 -5
- package/dist/lib/skills.js.map +1 -1
- package/dist/lib/tools.d.ts +1 -1
- package/dist/lib/tools.d.ts.map +1 -1
- package/dist/lib/tools.js +3 -3
- package/dist/lib/tools.js.map +1 -1
- package/package.json +3 -3
- package/src/bin/droid.ts +8 -8
- package/src/commands/config.ts +1 -1
- package/src/commands/install.ts +3 -3
- package/src/commands/setup.test.ts +1 -1
- package/src/commands/setup.ts +3 -3
- package/src/commands/skills.ts +4 -4
- package/src/commands/tui/components/Badge.tsx +86 -0
- package/src/commands/tui/components/Markdown.tsx +48 -0
- package/src/commands/tui/components/SettingsDetails.tsx +70 -0
- package/src/commands/tui/components/TabBar.tsx +26 -0
- package/src/commands/tui/components/ToolDetails.tsx +117 -0
- package/src/commands/tui/components/ToolItem.tsx +39 -0
- package/src/commands/tui/constants.ts +17 -0
- package/src/commands/tui/hooks/useAppUpdate.ts +67 -0
- package/src/commands/tui/hooks/useToolUpdates.ts +110 -0
- package/src/commands/tui/types.ts +4 -0
- package/src/commands/tui/views/ReadmeViewer.tsx +93 -0
- package/src/commands/tui/views/SetupScreen.tsx +242 -0
- package/src/commands/tui/views/SkillConfigScreen.tsx +278 -0
- package/src/commands/tui/views/ToolExplorer.tsx +190 -0
- package/src/commands/tui/views/ToolUpdatePrompt.tsx +109 -0
- package/src/commands/tui/views/WelcomeScreen.tsx +149 -0
- package/src/commands/tui.tsx +65 -1587
- package/src/commands/uninstall.ts +2 -2
- package/src/commands/update.ts +1 -1
- package/src/index.ts +4 -4
- package/src/lib/agents.ts +4 -4
- package/src/lib/config.ts +1 -1
- package/src/lib/platforms.ts +1 -1
- package/src/lib/skill-config.ts +2 -2
- package/src/lib/skills.test.ts +2 -2
- package/src/lib/skills.ts +5 -5
- package/src/lib/tools.ts +3 -3
- package/src/lib/types.test.ts +1 -1
- package/src/lib/version.test.ts +1 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { Box, Text, useInput } from 'ink';
|
|
2
|
+
import { useState, useMemo } from 'react';
|
|
3
|
+
import { colors } from '../constants';
|
|
4
|
+
import { getRandomQuote } from '../../../lib/quotes';
|
|
5
|
+
import type { UpdateInfo } from '../../../lib/version';
|
|
6
|
+
|
|
7
|
+
export interface WelcomeScreenProps {
|
|
8
|
+
onContinue: () => void;
|
|
9
|
+
onUpdate: () => void;
|
|
10
|
+
onAlways: () => void;
|
|
11
|
+
onExit: () => void;
|
|
12
|
+
updateInfo: UpdateInfo;
|
|
13
|
+
isUpdating: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function WelcomeScreen({ onContinue, onUpdate, onAlways, onExit, updateInfo, isUpdating }: WelcomeScreenProps) {
|
|
17
|
+
const [selectedButton, setSelectedButton] = useState(0);
|
|
18
|
+
const welcomeQuote = useMemo(() => getRandomQuote(), []);
|
|
19
|
+
|
|
20
|
+
useInput((input, key) => {
|
|
21
|
+
if (isUpdating) return;
|
|
22
|
+
|
|
23
|
+
if (updateInfo.hasUpdate) {
|
|
24
|
+
if (key.leftArrow) {
|
|
25
|
+
setSelectedButton((prev) => Math.max(0, prev - 1));
|
|
26
|
+
}
|
|
27
|
+
if (key.rightArrow) {
|
|
28
|
+
setSelectedButton((prev) => Math.min(2, prev + 1));
|
|
29
|
+
}
|
|
30
|
+
if (key.return) {
|
|
31
|
+
if (selectedButton === 0) {
|
|
32
|
+
onUpdate();
|
|
33
|
+
} else if (selectedButton === 1) {
|
|
34
|
+
onAlways();
|
|
35
|
+
} else {
|
|
36
|
+
onContinue();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (input === 'q') {
|
|
40
|
+
onExit();
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
if (key.return) {
|
|
44
|
+
onContinue();
|
|
45
|
+
}
|
|
46
|
+
if (input === 'q') {
|
|
47
|
+
onExit();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const hasUpdate = updateInfo.hasUpdate && updateInfo.latestVersion;
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<Box flexDirection="column" alignItems="center" justifyContent="center" height={18}>
|
|
56
|
+
<Box
|
|
57
|
+
flexDirection="column"
|
|
58
|
+
alignItems="center"
|
|
59
|
+
borderStyle="single"
|
|
60
|
+
borderColor={hasUpdate ? '#eab308' : colors.border}
|
|
61
|
+
paddingX={4}
|
|
62
|
+
paddingY={1}
|
|
63
|
+
>
|
|
64
|
+
<Box flexDirection="column">
|
|
65
|
+
<Text>
|
|
66
|
+
<Text color={colors.textDim}>╔═════╗ </Text>
|
|
67
|
+
<Text color={colors.text}>droid</Text>
|
|
68
|
+
<Text color={colors.textDim}> v{updateInfo.currentVersion}</Text>
|
|
69
|
+
</Text>
|
|
70
|
+
<Text>
|
|
71
|
+
<Text color={colors.textDim}>║ </Text>
|
|
72
|
+
<Text color={hasUpdate ? '#eab308' : colors.primary}>●</Text>
|
|
73
|
+
<Text color={colors.textDim}> </Text>
|
|
74
|
+
<Text color={hasUpdate ? '#eab308' : colors.primary}>●</Text>
|
|
75
|
+
<Text color={colors.textDim}> ║ </Text>
|
|
76
|
+
<Text color={colors.textMuted}>Droid, teaching your AI new tricks</Text>
|
|
77
|
+
</Text>
|
|
78
|
+
<Text>
|
|
79
|
+
<Text color={colors.textDim}>╚═╦═╦═╝ </Text>
|
|
80
|
+
<Text color={colors.textDim}>github.com/Orderful/droid</Text>
|
|
81
|
+
</Text>
|
|
82
|
+
</Box>
|
|
83
|
+
|
|
84
|
+
{hasUpdate ? (
|
|
85
|
+
<>
|
|
86
|
+
<Box marginTop={2} marginBottom={1} flexDirection="column" alignItems="center">
|
|
87
|
+
<Text color="#eab308" italic>
|
|
88
|
+
"The odds of functioning optimally without this
|
|
89
|
+
</Text>
|
|
90
|
+
<Text color="#eab308" italic>
|
|
91
|
+
update are approximately 3,720 to 1."
|
|
92
|
+
</Text>
|
|
93
|
+
</Box>
|
|
94
|
+
|
|
95
|
+
<Box marginBottom={1}>
|
|
96
|
+
<Text color={colors.textMuted}>
|
|
97
|
+
v{updateInfo.currentVersion} → v{updateInfo.latestVersion}
|
|
98
|
+
</Text>
|
|
99
|
+
</Box>
|
|
100
|
+
|
|
101
|
+
{isUpdating ? (
|
|
102
|
+
<Text color="#eab308">Updating...</Text>
|
|
103
|
+
) : (
|
|
104
|
+
<Box flexDirection="row">
|
|
105
|
+
<Text
|
|
106
|
+
backgroundColor={selectedButton === 0 ? '#eab308' : colors.bgSelected}
|
|
107
|
+
color={selectedButton === 0 ? '#000000' : colors.textMuted}
|
|
108
|
+
bold={selectedButton === 0}
|
|
109
|
+
>
|
|
110
|
+
{' '}Update{' '}
|
|
111
|
+
</Text>
|
|
112
|
+
<Text> </Text>
|
|
113
|
+
<Text
|
|
114
|
+
backgroundColor={selectedButton === 1 ? '#eab308' : colors.bgSelected}
|
|
115
|
+
color={selectedButton === 1 ? '#000000' : colors.textMuted}
|
|
116
|
+
bold={selectedButton === 1}
|
|
117
|
+
>
|
|
118
|
+
{' '}Always{' '}
|
|
119
|
+
</Text>
|
|
120
|
+
<Text> </Text>
|
|
121
|
+
<Text
|
|
122
|
+
backgroundColor={selectedButton === 2 ? colors.bgSelected : undefined}
|
|
123
|
+
color={selectedButton === 2 ? colors.text : colors.textMuted}
|
|
124
|
+
bold={selectedButton === 2}
|
|
125
|
+
>
|
|
126
|
+
{' '}Skip{' '}
|
|
127
|
+
</Text>
|
|
128
|
+
</Box>
|
|
129
|
+
)}
|
|
130
|
+
|
|
131
|
+
<Box marginTop={1}>
|
|
132
|
+
<Text color={colors.textDim}>←→ select · enter · "Always" enables auto-update</Text>
|
|
133
|
+
</Box>
|
|
134
|
+
</>
|
|
135
|
+
) : (
|
|
136
|
+
<>
|
|
137
|
+
<Box marginTop={2} marginBottom={1}>
|
|
138
|
+
<Text backgroundColor={colors.primary} color="#ffffff" bold>
|
|
139
|
+
{` ${welcomeQuote} `}
|
|
140
|
+
</Text>
|
|
141
|
+
</Box>
|
|
142
|
+
|
|
143
|
+
<Text color={colors.textDim}>press enter</Text>
|
|
144
|
+
</>
|
|
145
|
+
)}
|
|
146
|
+
</Box>
|
|
147
|
+
</Box>
|
|
148
|
+
);
|
|
149
|
+
}
|