MCPcopy Index your code
hub / github.com/coder/coder / fetchLogs

Function fetchLogs

site/src/modules/resources/DownloadAgentLogsButton.tsx:24–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 const [isDownloading, setIsDownloading] = useState(false);
23
24 const fetchLogs = async () => {
25 const queryOpts = agentLogs(agent.id);
26 let logs = queryClient.getQueryData<WorkspaceAgentLog[]>(
27 queryOpts.queryKey,
28 );
29 if (!logs) {
30 logs = await queryClient.fetchQuery(queryOpts);
31 }
32 return logs;
33 };
34
35 return (
36 <Button

Callers 1

DownloadAgentLogsButtonFunction · 0.85

Calls 1

agentLogsFunction · 0.90

Tested by

no test coverage detected