twinnydotdev / twinny

The most no-nonsense, locally or API-hosted AI code completion plugin for Visual Studio Code - like GitHub Copilot but completely free and 100% private.
https://twinny.dev
MIT License
3.12k stars 166 forks source link

"Consider to use 'storageUri' or 'globalStorageUri' to store this data on disk instead." #400

Open unclemusclez opened 1 week ago

unclemusclez commented 1 week ago

Number characters in all messages = 39382

Not sure if this is what is causing the issue, but longer context seem to timeout.

At the moment, I've selected all of my code, and then used my own custom template Explain.

prompting "Test" in the chat bot seems to work, but when I use excessive prompts, it will timeout. The entire code is aobut 1000 lines currently of Python, seemingly equating to 1984.2265625kb.

I am using Ollama with Twinny, and this connects over NGINX. This may be an area to inspect for the timeout, however, the instruct bot will connect and communicate, but the larger windows will trigger errors.

  Number characters in all messages = 39382
log.ts:439   ERR [Extension Host]  [ERROR_twinny]  Message: Failed to establish connection 
  Error Type: Error 
  Error Message: Request timed out 
  Error: Request timed out
    at Timeout._onTimeout (/home/musclez/.vscode-server/extensions/rjmacarthy.twinny-3.19.4/out/index.js:57653:7)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7)
console.ts:137 [Extension Host]  [ERROR_twinny]  Message: Failed to establish connection   Error Type: Error   Error Message: Request timed out   Error: Request timed out
    at Timeout._onTimeout (/home/musclez/.vscode-server/extensions/rjmacarthy.twinny-3.19.4/out/index.js:57653:7)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7)
uGi @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
B @ event.ts:1243
fire @ event.ts:1274
fire @ ipc.net.ts:652
A @ ipc.net.ts:1022
(anonymous) @ ipc.net.ts:879
B @ event.ts:1243
fire @ event.ts:1274
acceptChunk @ ipc.net.ts:394
(anonymous) @ ipc.net.ts:350
(anonymous) @ browserSocketFactory.ts:231
B @ event.ts:1243
fire @ event.ts:1274
IPs.j.onload @ browserSocketFactory.ts:92
log.ts:429  WARN [mainThreadStorage] large extension state detected (extensionId: rjmacarthy.twinny, global: true): 1984.2265625kb. Consider to use 'storageUri' or 'globalStorageUri' to store this data on disk instead.
log.ts:429  WARN [mainThreadStorage] large extension state detected (extensionId: rjmacarthy.twinny, global: true): 1984.37890625kb. Consider to use 'storageUri' or 'globalStorageUri' to store this data on disk instead.
log.ts:429  WARN [mainThreadStorage] large extension state detected (extensionId: rjmacarthy.twinny, global: true): 1984.2265625kb. Consider to use 'storageUri' or 'globalStorageUri' to store this data on disk instead.
log.ts:429  WARN [mainThreadStorage] large extension state detected (extensionId: rjmacarthy.twinny, global: true): 1984.37890625kb. Consider to use 'storageUri' or 'globalStorageUri' to store this data on disk instead.

image

image

yuzcat01 commented 1 week ago

Hello, can you give more information on this issue?Is there any useful output in the dialog window at the end, or could you please look at the server-side log of the model to determine whether the error came from not passing context to the model or some other part? I don't know much about NGINX. In the previous setting about timeout #378 I briefly set the timer for 25 seconds from the time of the request, maybe it has something to do with that? You can try pressing Refresh in the upper right corner of the error message to see if any replies have been received after the timeout.I'm sorry if the error did come from a timeout that was too short, causing an error box to appear before a reply was received