MCPcopy Index your code
hub / github.com/coder/mux / hasAcceptedInitialTaskPrompt

Method hasAcceptedInitialTaskPrompt

src/node/services/taskService.ts:2150–2163  ·  view source on GitHub ↗
(workspaceId: string)

Source from the content-addressed store, hash-verified

2148 }
2149
2150 private async hasAcceptedInitialTaskPrompt(workspaceId: string): Promise<boolean> {
2151 assert(workspaceId.length > 0, "hasAcceptedInitialTaskPrompt: workspaceId must be non-empty");
2152
2153 const historyResult = await this.historyService.getHistoryFromLatestBoundary(workspaceId);
2154 if (!historyResult.success) {
2155 log.warn("Failed to inspect task history during stale starting recovery", {
2156 workspaceId,
2157 error: historyResult.error,
2158 });
2159 return false;
2160 }
2161
2162 return historyResult.data.some((message) => message.role === "user");
2163 }
2164
2165 private startWorkspaceInit(workspaceId: string, projectPath: string): InitLogger {
2166 assert(workspaceId.length > 0, "startWorkspaceInit: workspaceId must be non-empty");

Callers 1

initializeMethod · 0.95

Calls 2

assertFunction · 0.50

Tested by

no test coverage detected