MCPcopy
hub / github.com/AutoMaker-Org/automaker / handleCreateSession

Function handleCreateSession

apps/ui/src/components/session-manager.tsx:187–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185
186 // Create new session with random name
187 const handleCreateSession = async () => {
188 const api = getElectronAPI();
189 if (!api?.sessions) return;
190
191 const sessionName = newSessionName.trim() || generateRandomSessionName();
192
193 const result = await api.sessions.create(sessionName, projectPath, effectiveWorkingDirectory);
194
195 if (result.success && result.session?.id) {
196 setNewSessionName('');
197 setIsCreating(false);
198 await invalidateSessions();
199 onSelectSession(result.session.id);
200 }
201 };
202
203 // Create new session directly with a random name (one-click)
204 const handleQuickCreateSession = useCallback(async () => {

Callers 1

SessionManagerFunction · 0.85

Calls 3

getElectronAPIFunction · 0.90
createMethod · 0.45

Tested by

no test coverage detected