termi-kids 0.2.0 → 0.2.2
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/README.md +1 -1
- package/SAFETY.md +1 -1
- package/dist/surfaces/buildGame.js +13 -5
- package/dist/surfaces/commands.js +3 -3
- package/dist/surfaces/home.js +12 -3
- package/dist/ui/text.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,7 +100,7 @@ Inside the build chat, these slash commands work:
|
|
|
100
100
|
| `/preview` | Open the project in the browser. |
|
|
101
101
|
| `/undo` | Take back the last change. |
|
|
102
102
|
| `/redo` | Bring a change back. |
|
|
103
|
-
| `/new` |
|
|
103
|
+
| `/new` | Build a new game (idea list + blank shell). |
|
|
104
104
|
| `/ideas` | Get fun ideas. |
|
|
105
105
|
| `/badges` | See earned badges. |
|
|
106
106
|
| `/learn` | Play the short AI lessons. |
|
package/SAFETY.md
CHANGED
|
@@ -117,7 +117,7 @@ Termi is built so that the developer never touches your family's data, because t
|
|
|
117
117
|
|
|
118
118
|
- **100% local.** No Termi servers exist. No telemetry, no analytics, no crash reporting, no account with Termi. Nothing phones home.
|
|
119
119
|
- **Chat goes to one place.** The kid's messages (after personal-info masking) and the project files go only to the AI provider you configured, to generate the code and run the safety checks. No other network calls are made on the kid's behalf.
|
|
120
|
-
- **You are the account holder.** Termi has no relationship with your child. You bring your own AI account, you
|
|
120
|
+
- **You are the account holder.** Termi has no relationship with your child. You bring your own AI account, you agree during setup to watch how your kid uses it, and your consent is recorded, timestamped, in the local safety log. There is one safety bar for every age (no under-13 / over-13 setup choice). The AI provider's privacy policy governs what happens to text sent to it; that is a relationship between you and the provider you chose.
|
|
121
121
|
- **Personal info is kept out of the AI.** The local filter masks names, addresses, phones, emails, and school names before sending. On "My Page" website projects, personal touches like a name are typed directly into the page in the browser preview and saved in the browser's local storage on this computer; they never pass through the chat, so they never reach the AI provider at all.
|
|
122
122
|
- **Kid projects are plain files** in `~/Termi`, readable and yours forever.
|
|
123
123
|
|
|
@@ -54,7 +54,7 @@ async function pickProjectName(idea) {
|
|
|
54
54
|
const suggested = defaultNameForIdea(idea);
|
|
55
55
|
const typed = await p.text({
|
|
56
56
|
message: 'Name your game.',
|
|
57
|
-
|
|
57
|
+
initialValue: suggested,
|
|
58
58
|
defaultValue: suggested,
|
|
59
59
|
validate: (value) => {
|
|
60
60
|
const trimmed = (value ?? '').trim() || suggested;
|
|
@@ -112,16 +112,24 @@ async function obtainPrompt(idea) {
|
|
|
112
112
|
draft = suggestPromptFromAnswers(idea, answers);
|
|
113
113
|
p.note(draft, 'Suggested prompt');
|
|
114
114
|
}
|
|
115
|
+
// clack: initialValue pre-fills the field; defaultValue is only applied
|
|
116
|
+
// AFTER validate. Empty Enter with only defaultValue fails validate, so
|
|
117
|
+
// we pre-fill and also accept empty when a draft already exists.
|
|
115
118
|
const text = await p.text({
|
|
116
119
|
message: path === 'write' ? 'Type your prompt.' : 'Edit the prompt, or press Enter to run it.',
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
initialValue: draft.length > 0 ? draft : undefined,
|
|
121
|
+
defaultValue: draft.length > 0 ? draft : undefined,
|
|
122
|
+
placeholder: draft.length > 0 ? undefined : 'Make a fun browser game where...',
|
|
123
|
+
validate: (value) => {
|
|
124
|
+
const resolved = (value ?? '').trim() || draft.trim();
|
|
125
|
+
return resolved.length > 0 ? undefined : 'Need a prompt to build.';
|
|
126
|
+
},
|
|
120
127
|
});
|
|
121
128
|
if (p.isCancel(text)) {
|
|
122
129
|
return null;
|
|
123
130
|
}
|
|
124
|
-
|
|
131
|
+
const resolved = text.trim() || draft.trim();
|
|
132
|
+
return resolved.length > 0 ? resolved : null;
|
|
125
133
|
}
|
|
126
134
|
function listKidFileSummaries(project) {
|
|
127
135
|
const out = [];
|
|
@@ -110,10 +110,10 @@ export function helpText() {
|
|
|
110
110
|
['/preview', 'watch your project run'],
|
|
111
111
|
['/undo', 'take back the last change'],
|
|
112
112
|
['/redo', 'bring a change back'],
|
|
113
|
-
['/new', '
|
|
114
|
-
['/ideas', 'get
|
|
113
|
+
['/new', 'build a new game'],
|
|
114
|
+
['/ideas', 'get game ideas'],
|
|
115
115
|
['/badges', 'see your badges'],
|
|
116
|
-
['/learn', '
|
|
116
|
+
['/learn', 'Learn AI lessons'],
|
|
117
117
|
['/quest', 'build with me, step by step'],
|
|
118
118
|
['/help', 'show this list'],
|
|
119
119
|
['/done', 'finish and celebrate'],
|
package/dist/surfaces/home.js
CHANGED
|
@@ -294,11 +294,20 @@ export async function openChatLoop(project, settings) {
|
|
|
294
294
|
if (exit !== 'new') {
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
// /new always opens Build a game (blank shell + ideas), never the
|
|
298
|
+
// multi-scaffold stock-project picker.
|
|
299
|
+
try {
|
|
300
|
+
const build = await import('./buildGame.js');
|
|
301
|
+
const next = await build.runBuildGame(settings);
|
|
302
|
+
if (next === null) {
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
current = next;
|
|
306
|
+
}
|
|
307
|
+
catch {
|
|
308
|
+
p.log.warn('Build a game is taking a nap. Try again soon.');
|
|
299
309
|
return;
|
|
300
310
|
}
|
|
301
|
-
current = next;
|
|
302
311
|
}
|
|
303
312
|
}
|
|
304
313
|
async function loadLastProject(settings) {
|
package/dist/ui/text.js
CHANGED
|
@@ -149,7 +149,7 @@ export const T = {
|
|
|
149
149
|
'Type /ideas if you feel stuck.',
|
|
150
150
|
'Type /badges to see what you earned.',
|
|
151
151
|
'Type /help to see every command.',
|
|
152
|
-
'Type /new to
|
|
152
|
+
'Type /new to build a new game.',
|
|
153
153
|
'Type /done when you finish your project.',
|
|
154
154
|
],
|
|
155
155
|
celebrations: {
|
package/package.json
CHANGED