mirror of
https://github.com/garrytan/gstack.git
synced 2026-06-30 21:45:38 +02:00
c51f3044e1
The telemetry consent prompt promised "no repo names" while the preamble epilogue records the repo basename in the local skill-usage.jsonl. It is already stripped before any remote upload, so it never left the machine, but the copy was unqualified. Reword it to state repo name is local-only and stripped before upload. Also sanitize the basename to [a-zA-Z0-9._-] before it goes into the hand-built JSON, so a repo directory name containing quotes or newlines can neither break the JSON nor leak a fragment past the regex stripper. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
32 lines
966 B
TypeScript
32 lines
966 B
TypeScript
import type { TemplateContext } from '../types';
|
|
|
|
export function generateTelemetryPrompt(ctx: TemplateContext): string {
|
|
return `If \`TEL_PROMPTED\` is \`no\` AND \`LAKE_INTRO\` is \`yes\`: ask telemetry once via AskUserQuestion:
|
|
|
|
> Help gstack get better. Share usage data only: skill, duration, crashes, stable device ID. No code or file paths. Your repo name is recorded locally only and stripped before any upload.
|
|
|
|
Options:
|
|
- A) Help gstack get better! (recommended)
|
|
- B) No thanks
|
|
|
|
If A: run \`${ctx.paths.binDir}/gstack-config set telemetry community\`
|
|
|
|
If B: ask follow-up:
|
|
|
|
> Anonymous mode sends only aggregate usage, no unique ID.
|
|
|
|
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:
|
|
\`\`\`bash
|
|
touch ~/.gstack/.telemetry-prompted
|
|
\`\`\`
|
|
|
|
Skip if \`TEL_PROMPTED\` is \`yes\`.`;
|
|
}
|