v2 - RFC Extract Tasks out of protocol.ts into TaskManager (#1673)
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
This commit is contained in:
parent
7d9c72eee5
commit
462c3fc47d
2 changed files with 2122 additions and 1942 deletions
|
|
@ -265,14 +265,14 @@ async function connect(url?: string): Promise<void> {
|
|||
form: {}
|
||||
},
|
||||
tasks: {
|
||||
taskStore: clientTaskStore,
|
||||
requests: {
|
||||
elicitation: {
|
||||
create: {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
taskStore: clientTaskStore
|
||||
}
|
||||
}
|
||||
);
|
||||
client.onerror = error => {
|
||||
|
|
|
|||
|
|
@ -41,9 +41,14 @@ const getServer = () => {
|
|||
websiteUrl: 'https://github.com/modelcontextprotocol/typescript-sdk'
|
||||
},
|
||||
{
|
||||
capabilities: { logging: {}, tasks: { requests: { tools: { call: {} } } } },
|
||||
taskStore, // Enable task support
|
||||
taskMessageQueue: new InMemoryTaskMessageQueue()
|
||||
capabilities: {
|
||||
logging: {},
|
||||
tasks: {
|
||||
requests: { tools: { call: {} } },
|
||||
taskStore,
|
||||
taskMessageQueue: new InMemoryTaskMessageQueue()
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue