Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent crash with Kate editor #3428

Open
Mte90 opened this issue Nov 15, 2024 · 1 comment
Open

Agent crash with Kate editor #3428

Mte90 opened this issue Nov 15, 2024 · 1 comment
Assignees

Comments

@Mte90
Copy link

Mte90 commented Nov 15, 2024

I just tried to setup the LSP server on the Kate kde editor with this settings:

"php": {
            "command": ["npx", "tabby-agent", "--lsp", "--stdio"],
            "path": ["/usr/local/bin"],
            "url": "https://tabby.tabbyml.com/"
        },
        "python": {
            "command": ["npx", "tabby-agent", "--lsp", "--stdio"],
            "path": ["/usr/local/bin"],
            "url": "https://tabby.tabbyml.com/"
        }

So now tabby is executed like the others.

Just created a php file and crashed with this error:

/home/mte90/.npm/_npx/1d13cd4238ddbf8f/node_modules/tabby-agent/dist/node/index.js:51
${JSON.stringify(q.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else {let le=q.id,me=I.get(le);if(ho(q,me),me!==void 0){I.delete(le);try{if(q.error){let Ue=q.error;me.reject(new st.ResponseError(Ue.code,Ue.message,Ue.data));}else if(q.result!==void 0)me.resolve(q.result);else throw new Error("Should never happen.")}catch(Ue){Ue.message?i.error(`Response handler '${me.method}' failed with message: ${Ue.message}`):i.error(`Response handler '${me.method}' failed unexpectedly.`);}}}}function ze(q){if(Je())return;let le,me;if(q.method===Vd.type.method){let Ue=q.params.id;C.delete(Ue),pn(q);return}else {let Ue=f.get(q.method);Ue&&(me=Ue.handler,le=Ue.type);}if(me||A)try{if(pn(q),me)if(q.params===void 0)le!==void 0&&le.numberOfParams!==0&&le.parameterStructures!==st.ParameterStructures.byName&&i.error(`Notification ${q.method} defines ${le.numberOfParams} params but received none.`),me();else if(Array.isArray(q.params)){let Ue=q.params;q.method===Gd.type.method&&Ue.length===2&&xQ.is(Ue[0])?me({token:Ue[0],value:Ue[1]}):(le!==void 0&&(le.parameterStructures===st.ParameterStructures.byName&&i.error(`Notification ${q.method} defines parameters by name but received parameters by position`),le.numberOfParams!==q.params.length&&i.error(`Notification ${q.method} defines ${le.numberOfParams} params but received ${Ue.length} arguments`)),me(...Ue));}else le!==void 0&&le.parameterStructures===st.ParameterStructures.byPosition&&i.error(`Notification ${q.method} defines parameters by position but received parameters by name`),me(q.params);else A&&A(q.method,q.params);}catch(Ue){Ue.message?i.error(`Notification handler '${q.method}' failed with message: ${Ue.message}`):i.error(`Notification handler '${q.method}' failed unexpectedly.`);}else G.fire(q);}function fe(q){if(!q){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
                                                                                                                                                                                                                                            ^
e [Error]: client/unregisterCapability
    at ye (/home/mte90/.npm/_npx/1d13cd4238ddbf8f/node_modules/tabby-agent/dist/node/index.js:51:237)
    at ut (/home/mte90/.npm/_npx/1d13cd4238ddbf8f/node_modules/tabby-agent/dist/node/index.js:50:6273)
    at Fe (/home/mte90/.npm/_npx/1d13cd4238ddbf8f/node_modules/tabby-agent/dist/node/index.js:50:6400)
    at Immediate. (/home/mte90/.npm/_npx/1d13cd4238ddbf8f/node_modules/tabby-agent/dist/node/index.js:50:6158)
    at process.processImmediate (node:internal/timers:483:21) {
  code: -32601,
  data: undefined
}
Node.js v20.18.0
@Mte90
Copy link
Author

Mte90 commented Nov 15, 2024

I think that the issue is on https://github.com/TabbyML/tabby/blob/main/clients/tabby-agent/src/protocol.ts#L100 and it is missing that capability.

It isn't better if the capabilities to avoid a crash and just report the error, like this capabilities is not supported yet?

@icycodes icycodes self-assigned this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants