MCPcopy
hub / github.com/opentrace/opentrace / indexUrl

Method indexUrl

ui/src/store/serverStore.ts:179–188  ·  view source on GitHub ↗

* Ask the agent to index a remote repository server-side. The agent * handles cloning/extracting; the browser does no tree-sitter work in * this path. Used by server-mode "Add Repo" (browserJobService routes * to this method instead of running the in-browser pipeline). * * Returns the

(body: {
    repoUrl: string;
    repoId?: string;
    token?: string;
    ref?: string;
    zipball?: boolean;
    reindex?: boolean;
  })

Source from the content-addressed store, hash-verified

177 * Returns the job id; poll {@link getIndexProgress} until `done`.
178 */
179 async indexUrl(body: {
180 repoUrl: string;
181 repoId?: string;
182 token?: string;
183 ref?: string;
184 zipball?: boolean;
185 reindex?: boolean;
186 }): Promise<{ jobId: string; status: string }> {
187 return this.post<{ jobId: string; status: string }>('/api/index-url', body);
188 }
189
190 /** Read the current state of a server-side index job. The UI polls
191 * this every ~1.5s during a server-mode index (Fix #6). */

Callers 1

runMethod · 0.80

Calls 1

postMethod · 0.95

Tested by

no test coverage detected