mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-08 14:34:49 +02:00
feat: community-first telemetry opt-in with anonymous fallback
Default opt-in is now "Help gstack get better!" (community mode with stable device ID). If declined, offers anonymous mode as a softer alternative before fully off.
This commit is contained in:
@@ -190,16 +190,28 @@ function generateTelemetryPrompt(ctx: TemplateContext): string {
|
|||||||
return `If \`TEL_PROMPTED\` is \`no\` AND \`LAKE_INTRO\` is \`yes\`: After the lake intro is handled,
|
return `If \`TEL_PROMPTED\` is \`no\` AND \`LAKE_INTRO\` is \`yes\`: After the lake intro is handled,
|
||||||
ask the user about telemetry. Use AskUserQuestion:
|
ask the user about telemetry. Use AskUserQuestion:
|
||||||
|
|
||||||
> gstack can share anonymous usage data (which skills you use, how long they take, crash info)
|
> Help gstack get better! Community mode shares usage data (which skills you use, how long
|
||||||
> to help improve the project. No code, file paths, or repo names are ever sent.
|
> they take, crash info) with a stable device ID so we can track trends and fix bugs faster.
|
||||||
|
> No code, file paths, or repo names are ever sent.
|
||||||
> Change anytime with \`gstack-config set telemetry off\`.
|
> Change anytime with \`gstack-config set telemetry off\`.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
- A) Yes, share anonymous data (recommended)
|
- A) Help gstack get better! (recommended)
|
||||||
- B) No thanks
|
- B) No thanks
|
||||||
|
|
||||||
If A: run \`${ctx.paths.binDir}/gstack-config set telemetry anonymous\`
|
If A: run \`${ctx.paths.binDir}/gstack-config set telemetry community\`
|
||||||
If B: run \`${ctx.paths.binDir}/gstack-config set telemetry off\`
|
|
||||||
|
If B: ask a follow-up AskUserQuestion:
|
||||||
|
|
||||||
|
> How about anonymous mode? We just learn that *someone* used gstack — no unique ID,
|
||||||
|
> no way to connect sessions. Just a counter that helps us know if anyone's out there.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
- A) Sure, anonymous is fine
|
||||||
|
- B) No thanks, fully off
|
||||||
|
|
||||||
|
If B→A: run \`${ctx.paths.binDir}/gstack-config set telemetry anonymous\`
|
||||||
|
If B→B: run \`${ctx.paths.binDir}/gstack-config set telemetry off\`
|
||||||
|
|
||||||
Always run:
|
Always run:
|
||||||
\`\`\`bash
|
\`\`\`bash
|
||||||
|
|||||||
@@ -742,7 +742,8 @@ describe('telemetry', () => {
|
|||||||
test('generated SKILL.md contains telemetry opt-in prompt', () => {
|
test('generated SKILL.md contains telemetry opt-in prompt', () => {
|
||||||
const content = fs.readFileSync(path.join(ROOT, 'SKILL.md'), 'utf-8');
|
const content = fs.readFileSync(path.join(ROOT, 'SKILL.md'), 'utf-8');
|
||||||
expect(content).toContain('.telemetry-prompted');
|
expect(content).toContain('.telemetry-prompted');
|
||||||
expect(content).toContain('anonymous usage data');
|
expect(content).toContain('Help gstack get better');
|
||||||
|
expect(content).toContain('gstack-config set telemetry community');
|
||||||
expect(content).toContain('gstack-config set telemetry anonymous');
|
expect(content).toContain('gstack-config set telemetry anonymous');
|
||||||
expect(content).toContain('gstack-config set telemetry off');
|
expect(content).toContain('gstack-config set telemetry off');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user