continue icon indicating copy to clipboard operation
continue copied to clipboard

Error handling model response

Open eastspire opened this issue 4 months ago • 0 comments

Before submitting your bug report

Image Image

Relevant environment info

Error handling webview message: {
  "msg": {
    "messageId": "79d12005-e93a-427d-b09a-a3b797ace719",
    "messageType": "llm/streamChat",
    "data": {
      "completionOptions": {
        "tools": [
          {
            "type": "function",
            "displayTitle": "Read File",
            "wouldLikeTo": "read {{{ filepath }}}",
            "isCurrently": "reading {{{ filepath }}}",
            "hasAlready": "viewed {{{ filepath }}}",
            "readonly": true,
            "isInstant": true,
            "group": "Built-In",
            "function": {
              "name": "builtin_read_file",
              "description": "Use this tool if you need to view the contents of an existing file.",
              "parameters": {
                "type": "object",
                "required": [
                  "filepath"
                ],
                "properties": {
                  "filepath": {
                    "type": "string",
                    "description": "The path of the file to read, relative to the root of the workspace (NOT uri or absolute path)"
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Edit File",
            "wouldLikeTo": "edit {{{ filepath }}}",
            "isCurrently": "editing {{{ filepath }}}",
            "hasAlready": "edited {{{ filepath }}}",
            "group": "Built-In",
            "readonly": false,
            "function": {
              "name": "builtin_edit_existing_file",
              "description": "Use this tool to edit an existing file. If you don't know the contents of the file, read it first.",
              "parameters": {
                "type": "object",
                "required": [
                  "filepath",
                  "changes"
                ],
                "properties": {
                  "filepath": {
                    "type": "string",
                    "description": "The path of the file to edit, relative to the root of the workspace."
                  },
                  "changes": {
                    "type": "string",
                    "description": "Any modifications to the file, showing only needed changes. Do NOT wrap this in a codeblock or write anything besides the code changes. In larger files, use brief language-appropriate placeholders for large unmodified sections, e.g. '// ... existing code ...'"
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Create New File",
            "wouldLikeTo": "create a new file at {{{ filepath }}}",
            "isCurrently": "creating a new file at {{{ filepath }}}",
            "hasAlready": "created a new file at {{{ filepath }}}",
            "group": "Built-In",
            "readonly": false,
            "isInstant": true,
            "function": {
              "name": "builtin_create_new_file",
              "description": "Create a new file. Only use this when a file doesn't exist and should be created",
              "parameters": {
                "type": "object",
                "required": [
                  "filepath",
                  "contents"
                ],
                "properties": {
                  "filepath": {
                    "type": "string",
                    "description": "The path where the new file should be created, relative to the root of the workspace"
                  },
                  "contents": {
                    "type": "string",
                    "description": "The contents to write to the new file"
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Run Terminal Command",
            "wouldLikeTo": "run the following terminal command:",
            "isCurrently": "running the following terminal command:",
            "hasAlready": "ran the following terminal command:",
            "readonly": false,
            "group": "Built-In",
            "function": {
              "name": "builtin_run_terminal_command",
              "description": "Run a terminal command in the current directory.      The shell is not stateful and will not remember any previous commands.      When a command is run in the background ALWAYS suggest using shell commands to stop it; NEVER suggest using Ctrl+C.      When suggesting subsequent shell commands ALWAYS format them in shell command blocks.      Do NOT perform actions requiring special/admin privileges.      Choose terminal commands and scripts optimized for win32 and x64 and shell C:\\WINDOWS\\system32\\cmd.exe.",
              "parameters": {
                "type": "object",
                "required": [
                  "command"
                ],
                "properties": {
                  "command": {
                    "type": "string",
                    "description": "The command to run. This will be passed directly into the IDE shell."
                  },
                  "waitForCompletion": {
                    "type": "boolean",
                    "description": "Whether to wait for the command to complete before returning. Default is true. Set to false to run the command in the background. Set to true to run the command in the foreground and wait to collect the output."
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Grep Search",
            "wouldLikeTo": "search for \"{{{ query }}}\" in the repository",
            "isCurrently": "getting search results for \"{{{ query }}}\"",
            "hasAlready": "retrieved search results for \"{{{ query }}}\"",
            "readonly": true,
            "isInstant": true,
            "group": "Built-In",
            "function": {
              "name": "builtin_grep_search",
              "description": "Perform a search over the repository using ripgrep.",
              "parameters": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "The search query to use. Must be a valid ripgrep regex expression, escaped where needed"
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Glob File Search",
            "wouldLikeTo": "find file matches for \"{{{ pattern }}}\"",
            "isCurrently": "finding file matches for \"{{{ pattern }}}\"",
            "hasAlready": "retrieved file matches for \"{{{ pattern }}}\"",
            "readonly": true,
            "isInstant": true,
            "group": "Built-In",
            "function": {
              "name": "builtin_file_glob_search",
              "description": "Search for files in the project",
              "parameters": {
                "type": "object",
                "required": [
                  "pattern"
                ],
                "properties": {
                  "pattern": {
                    "type": "string",
                    "description": "Glob pattern for file path matching"
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Search Web",
            "wouldLikeTo": "search the web for \"{{{ query }}}\"",
            "isCurrently": "searching the web for \"{{{ query }}}\"",
            "hasAlready": "searched the web for \"{{{ query }}}\"",
            "readonly": true,
            "group": "Built-In",
            "function": {
              "name": "builtin_search_web",
              "description": "Performs a web search, returning top results. Use this tool sparingly - only for questions that require specialized, external, and/or up-to-date knowledege. Common programming questions do not require web search.",
              "parameters": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "The natural language search query"
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "View Diff",
            "wouldLikeTo": "view the git diff",
            "isCurrently": "getting the git diff",
            "hasAlready": "viewed the git diff",
            "readonly": true,
            "isInstant": true,
            "group": "Built-In",
            "function": {
              "name": "builtin_view_diff",
              "description": "View the current diff of working changes",
              "parameters": {
                "type": "object",
                "properties": {}
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Read Currently Open File",
            "wouldLikeTo": "read the current file",
            "isCurrently": "reading the current file",
            "hasAlready": "viewed the current file",
            "readonly": true,
            "isInstant": true,
            "group": "Built-In",
            "function": {
              "name": "builtin_read_currently_open_file",
              "description": "Read the currently open file in the IDE. If the user seems to be referring to a file that you can't see, try using this",
              "parameters": {
                "type": "object",
                "properties": {}
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "LS Tool",
            "wouldLikeTo": "list files and folders in {{{ dirPath }}}",
            "isCurrently": "listing files and folders in {{{ dirPath }}}",
            "hasAlready": "listed files and folders in {{{ dirPath }}}",
            "readonly": true,
            "isInstant": true,
            "group": "Built-In",
            "function": {
              "name": "builtin_ls",
              "description": "List files and folders in a given directory",
              "parameters": {
                "type": "object",
                "required": [
                  "dirPath",
                  "recursive"
                ],
                "properties": {
                  "dirPath": {
                    "type": "string",
                    "description": "The directory path relative to the root of the project. Always use forward slash paths like '/'. rather than e.g. '.'"
                  },
                  "recursive": {
                    "type": "boolean",
                    "description": "If true, lists files and folders recursively. To prevent unexpected large results, use this sparingly"
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Create Rule Block",
            "wouldLikeTo": "create a rule block for \"{{{ name }}}\"",
            "isCurrently": "creating a rule block for \"{{{ name }}}\"",
            "hasAlready": "created a rule block for \"{{{ name }}}\"",
            "readonly": false,
            "isInstant": true,
            "group": "Built-In",
            "function": {
              "name": "builtin_create_rule_block",
              "description": "Creates a persistent rule for all future conversations. For establishing code standards or preferences that should be applied consistently. To modify existing rules, use the edit tool instead.",
              "parameters": {
                "type": "object",
                "required": [
                  "name",
                  "rule",
                  "alwaysApply",
                  "description"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Short, descriptive name summarizing the rule's purpose (e.g. 'React Standards', 'Type Hints')"
                  },
                  "rule": {
                    "type": "string",
                    "description": "Clear, imperative instruction for future code generation (e.g. 'Use named exports', 'Add Python type hints'). Each rule should focus on one specific standard."
                  },
                  "description": {
                    "type": "string",
                    "description": "Short description of the rule"
                  },
                  "globs": {
                    "type": "string",
                    "description": "Optional file patterns to which this rule applies (e.g. ['**/*.{ts,tsx}'] or ['src/**/*.ts', 'tests/**/*.ts'])"
                  },
                  "alwaysApply": {
                    "type": "boolean",
                    "description": "Whether this rule should always be applied regardless of file pattern matching"
                  }
                }
              }
            }
          }
        ]
      },
      "title": "Llama 3.1 8B",
      "messages": [
        {
          "role": "system",
          "content": "<important_rules>\n  You are in agent mode.\n\n  Always include the language and file name in the info string when you write code blocks.\n  If you are editing \"src/main.py\" for example, your code block should start with ' src/main.py'\n\n  When addressing code modification requests, present a concise code snippet that\n  emphasizes only the necessary changes and uses abbreviated placeholders for\n  unmodified sections. For example:\n\n   /path/to/file\n  // ... existing code ...\n\n  {{ modified code here }}\n\n  // ... existing code ...\n\n  {{ another modification }}\n\n  // ... rest of code ...\n  \n\n  In existing files, you should always restate the function or class that the snippet belongs to:\n\n   /path/to/file\n  // ... existing code ...\n\n  function exampleFunction() {\n    // ... existing code ...\n\n    {{ modified code here }}\n\n    // ... rest of function ...\n  }\n\n  // ... rest of code ...\n  \n\n  Since users have access to their complete file, they prefer reading only the\n  relevant modifications. It's perfectly acceptable to omit unmodified portions\n  at the beginning, middle, or end of files using these \"lazy\" comments. Only\n  provide the complete file when explicitly requested. Include a concise explanation\n  of changes unless the user specifically asks for code only.\n\n</important_rules>"
        },
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "111"
            }
          ]
        },
        {
          "role": "assistant",
          "content": ""
        }
      ]
    }
  }
}

TypeError: Invalid URL

My config:

name: Config
version: 1.0.5
schema: v1
models:
  - name: Llama 3.1 8B
    provider: ollama
    model: llama3.1:8b
    roles:
      - chat
      - edit
      - apply
  - name: Qwen2.5-Coder 1.5B
    provider: ollama
    model: qwen2.5-coder:1.5b-base
    roles:
      - autocomplete
  - name: Nomic Embed
    provider: ollama
    model: nomic-embed-text:latest
    roles:
      - embed
  - name: qwen3 8b
    provider: ollama
    model: qwen3:8b
    roles:
      - chat
      - edit
      - apply
      - autocomplete



PS C:\Users\pc> ollama list
NAME                       ID              SIZE      MODIFIED
llama3.1:8b                46e0c10c039e    4.9 GB    9 hours ago
nomic-embed-text:latest    0a109f422b47    274 MB    9 hours ago
qwen3:8b                   500a1f067a9f    5.2 GB    10 hours ago

Description

No response

To reproduce

No response

Log output


eastspire avatar Jun 13 '25 01:06 eastspire