MCPcopy Index your code
hub / github.com/codeaashu/claude-code / ThinkbackFlow

Function ThinkbackFlow

src/commands/thinkback/thinkback.tsx:387–547  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

385const FIX_PROMPT = 'Use the Skill tool to invoke the "thinkback" skill with mode=fix to fix validation or rendering errors in my existing Claude Code year in review animation. Run the validator, identify errors, and fix them. When the animation is ready, tell the user to run /think-back again to play it.';
386const REGENERATE_PROMPT = 'Use the Skill tool to invoke the "thinkback" skill with mode=regenerate to create a completely new Claude Code year in review animation from scratch. Delete the existing animation and start fresh. When the animation is ready, tell the user to run /think-back again to play it.';
387function ThinkbackFlow(t0) {
388 const $ = _c(27);
389 const {
390 onDone
391 } = t0;
392 const [installComplete, setInstallComplete] = useState(false);
393 const [installError, setInstallError] = useState(null);
394 const [skillDir, setSkillDir] = useState(null);
395 const [hasGenerated, setHasGenerated] = useState(null);
396 let t1;
397 if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
398 t1 = function handleReady() {
399 setInstallComplete(true);
400 };
401 $[0] = t1;
402 } else {
403 t1 = $[0];
404 }
405 const handleReady = t1;
406 let t2;
407 if ($[1] !== onDone) {
408 t2 = message => {
409 setInstallError(message);
410 onDone(`Error with thinkback: ${message}. Try running /plugin to manually install the think-back plugin.`, {
411 display: "system"
412 });
413 };
414 $[1] = onDone;
415 $[2] = t2;
416 } else {
417 t2 = $[2];
418 }
419 const handleError = t2;
420 let t3;
421 let t4;
422 if ($[3] !== handleError || $[4] !== installComplete || $[5] !== installError || $[6] !== skillDir) {
423 t3 = () => {
424 if (installComplete && !skillDir && !installError) {
425 getThinkbackSkillDir().then(dir => {
426 if (dir) {
427 logForDebugging(`Thinkback skill directory: ${dir}`);
428 setSkillDir(dir);
429 } else {
430 handleError("Could not find thinkback skill directory");
431 }
432 });
433 }
434 };
435 t4 = [installComplete, skillDir, installError, handleError];
436 $[3] = handleError;
437 $[4] = installComplete;
438 $[5] = installError;
439 $[6] = skillDir;
440 $[7] = t3;
441 $[8] = t4;
442 } else {
443 t3 = $[7];
444 t4 = $[8];

Callers

nothing calls this directly

Calls 4

getThinkbackSkillDirFunction · 0.85
logForDebuggingFunction · 0.85
pathExistsFunction · 0.85
onDoneFunction · 0.50

Tested by

no test coverage detected