MCPcopy
hub / github.com/codedogQBY/ReadAny / fetch

Function fetch

packages/app/src/components/reader/TranslationPopover.tsx:136–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134 setTranslation(null);
135
136 const fetch = async () => {
137 try {
138 const input = text.split("\n").join(" ").trim();
139 const results = await translate([input]);
140 if (!cancelled && results[0]) {
141 setTranslation(results[0]);
142 }
143 } catch (err) {
144 console.error("Translation error:", err);
145 }
146 };
147
148 fetch();
149 return () => {

Callers 15

TranslationPopoverFunction · 0.70
loadFileAsBlobFunction · 0.70
testRemoteModelFunction · 0.50
TranslationPanelFunction · 0.50
fetchOpenAIModelsFunction · 0.50
fetchAnthropicModelsFunction · 0.50
fetchGoogleModelsFunction · 0.50
fetchDeepSeekModelsFunction · 0.50
fetchOllamaModelsFunction · 0.50
fetchLMStudioModelsFunction · 0.50
checkUpdateMethod · 0.50
EmbeddingPageFunction · 0.50

Calls 1

translateFunction · 0.85

Tested by

no test coverage detected