MCPcopy
hub / github.com/claude-code-best/claude-code / handleSelect

Function handleSelect

src/components/RemoteEnvironmentDialog.tsx:57–79  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

55 }, []);
56
57 function handleSelect(value: string): void {
58 if (value === 'cancel') {
59 onDone();
60 return;
61 }
62
63 setLoadingState('updating');
64
65 const selectedEnv = environments.find(env => env.environment_id === value);
66
67 if (!selectedEnv) {
68 onDone('Error: Selected environment not found');
69 return;
70 }
71
72 updateSettingsForSource('localSettings', {
73 remote: {
74 defaultEnvironmentId: selectedEnv.environment_id,
75 },
76 });
77
78 onDone(`Set default remote environment to ${chalk.bold(selectedEnv.name)} (${selectedEnv.environment_id})`);
79 }
80
81 // Loading state
82 if (loadingState === 'loading') {

Callers

nothing calls this directly

Calls 2

updateSettingsForSourceFunction · 0.85
onDoneFunction · 0.50

Tested by

no test coverage detected