Skip to content

fix: don't try to print undefined when there are no suggestions - #512

Merged
cpendery (cpendery) merged 2 commits into
microsoft:mainfrom
RGBCube:rgbcube/change-rtvsxrqtwkqx
Nov 24, 2026
Merged

cpendery (cpendery) merged 2 commits into
microsoft:mainfrom
RGBCube:rgbcube/change-rtvsxrqtwkqx

Conversation

@RGBCube

@RGBCube RGBCube (RGBCube) commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

previously:

$ is complete ""
node:internal/streams/writable:482
      throw new ERR_INVALID_ARG_TYPE(
            ^

TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
    at _write (node:internal/streams/writable:482:13)
    at Writable.write (node:internal/streams/writable:510:10)
    at Command.action (file:///nix/store/51lvsyrhbad3d3985fks3y2vr9yhdnyy-inshellisense-0.0.4/lib/node_modules/@microsoft/inshellisense/build/commands/complete.js:11:20) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v22.23.3

after this patch:

$ is complete ''
{"suggestions":[]}

previously:

    $ is complete ""
    node:internal/streams/writable:482
          throw new ERR_INVALID_ARG_TYPE(
                ^

    TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
        at _write (node:internal/streams/writable:482:13)
        at Writable.write (node:internal/streams/writable:510:10)
        at Command.action (file:///nix/store/51lvsyrhbad3d3985fks3y2vr9yhdnyy-inshellisense-0.0.4/lib/node_modules/@microsoft/inshellisense/build/commands/complete.js:11:20) {
      code: 'ERR_INVALID_ARG_TYPE'
    }

    Node.js v22.23.3

after this patch:

    $ is complete ''
    {"suggestions":[]}
@RGBCube
RGBCube (RGBCube) force-pushed the rgbcube/change-rtvsxrqtwkqx branch from c937faf to f228971 Compare November 18, 2026 23:38
@cpendery
cpendery (cpendery) merged commit 697475e into microsoft:main Nov 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants