continue icon indicating copy to clipboard operation
continue copied to clipboard

.prompt command leading to RangeError: Invalid array length

Open acstrahl opened this issue 1 year ago • 4 comments

Before submitting your bug report

Relevant environment info

- OS: Windows 11 Home 22H2
- Continue: v0.8.46
- IDE: VSCode 1.92.1
- Model:
- config.json:
  
{
  "models": [
    {
      "model": "claude-3-5-sonnet-20240620",
      "contextLength": 200000,
      "title": "Claude 3.5 Sonnet",
      "apiKey": "",
      "provider": "anthropic"
    },
    {
      "model": "gpt-4o",
      "contextLength": 128000,
      "title": "GPT-4o",
      "systemMessage": "You are an expert software developer. You give helpful and concise responses.",
      "apiKey": "",
      "provider": "openai"
    }
  ],
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
  "allowAnonymousTelemetry": true,
  "embeddingsProvider": {
    "provider": "free-trial"
  },
  "reranker": {
    "name": "free-trial"
  },
  "docs": []
}

Description

Any time I try to use a slash command I get an error message ("Invalid array length"). I have tried different LLMs, continue release and pre-release, and different .prompt files, but all result in the same error. prompts were working for me early last week, so I'm not sure what happened.

To reproduce

No response

Log output

INFO Extension host (LocalProcess pid: 1960) is unresponsive.
localProcessExtensionHost.ts:275 Extension Host
localProcessExtensionHost.ts:276 Debugger attached.
log.ts:419  INFO UNRESPONSIVE extension host: starting to profile NOW
log.ts:439   ERR [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "aed46bd9-ced7-440d-9f19-fc4f1db53495",
    "messageType": "command/run",
    "data": {
      "input": "/new-prompt-file ",
      "history": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "/new-prompt-file "
            }
          ]
        }
      ],
      "modelTitle": "Claude 3.5 Sonnet",
      "slashCommandName": "new-prompt-file",
      "contextItems": [],
      "historyIndex": 0,
      "selectedCode": []
    }
  }
}

RangeError: Invalid array length
console.ts:137 [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "aed46bd9-ced7-440d-9f19-fc4f1db53495",
    "messageType": "command/run",
    "data": {
      "input": "/new-prompt-file ",
      "history": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "/new-prompt-file "
            }
          ]
        }
      ],
      "modelTitle": "Claude 3.5 Sonnet",
      "slashCommandName": "new-prompt-file",
      "contextItems": [],
      "historyIndex": 0,
      "selectedCode": []
    }
  }
}

RangeError: Invalid array length
y @ 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:1230
fire @ event.ts:1261
fire @ ipc.net.ts:652
K.onmessage @ localProcessExtensionHost.ts:378
notificationsAlerts.ts:42 Invalid array length
c @ notificationsAlerts.ts:42
(anonymous) @ notificationsAlerts.ts:28
B @ event.ts:1230
C @ event.ts:1241
fire @ event.ts:1265
addNotification @ notifications.ts:228
notify @ notificationService.ts:253
(anonymous) @ mainThreadMessageService.ts:86
f @ mainThreadMessageService.ts:51
$showMessage @ mainThreadMessageService.ts:45
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
B @ event.ts:1230
fire @ event.ts:1261
fire @ ipc.net.ts:652
K.onmessage @ localProcessExtensionHost.ts:378
log.ts:419  INFO Extension host (LocalProcess pid: 1960) is responsive.
log.ts:419  INFO UNRESPONSIVE extension host: received responsive event and cancelling profiling session
log.ts:429  WARN UNRESPONSIVE extension host: 'vscode.git' took 97.14859063557336% of 698.579ms, saved PROFILE here: 'file:///c%3A/Users/username/AppData/Local/Temp/exthost-290192.cpuprofile'

acstrahl avatar Aug 13 '24 22:08 acstrahl