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

Function performHandoff

src/components/DesktopHandoff.tsx:71–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69 if ($[4] !== onDone) {
70 t2 = () => {
71 const performHandoff = async function performHandoff() {
72 setState("checking");
73 const installStatus = await getDesktopInstallStatus();
74 if (installStatus.status === "not-installed") {
75 setDownloadMessage("Claude Desktop is not installed.");
76 setState("prompt-download");
77 return;
78 }
79 if (installStatus.status === "version-too-old") {
80 setDownloadMessage(`Claude Desktop needs to be updated (found v${installStatus.version}, need v1.1.2396+).`);
81 setState("prompt-download");
82 return;
83 }
84 setState("flushing");
85 await flushSessionStorage();
86 setState("opening");
87 const result = await openCurrentSessionInDesktop();
88 if (!result.success) {
89 setError(result.error ?? "Failed to open Claude Desktop");
90 setState("error");
91 return;
92 }
93 setState("success");
94 setTimeout(_temp2, 500, onDone);
95 };
96 performHandoff().catch(err => {
97 setError(errorMessage(err));
98 setState("error");

Callers 1

DesktopHandoffFunction · 0.85

Calls 3

getDesktopInstallStatusFunction · 0.85
flushSessionStorageFunction · 0.85

Tested by

no test coverage detected