Merge branch 'main' into feature/elicitations
This commit is contained in:
commit
144755b369
1 changed files with 934 additions and 160 deletions
|
|
@ -95,7 +95,7 @@ export function useConnection({
|
|||
const [requestHistory, setRequestHistory] = useState<
|
||||
{ request: string; response?: string }[]
|
||||
>([]);
|
||||
const [completionsSupported, setCompletionsSupported] = useState(true);
|
||||
const [completionsSupported, setCompletionsSupported] = useState(false);
|
||||
|
||||
const pushHistory = (request: object, response?: object) => {
|
||||
setRequestHistory((prev) => [
|
||||
|
|
@ -510,7 +510,7 @@ export function useConnection({
|
|||
throw error;
|
||||
}
|
||||
setServerCapabilities(capabilities ?? null);
|
||||
setCompletionsSupported(true); // Reset completions support on new connection
|
||||
setCompletionsSupported(capabilities?.completions !== undefined);
|
||||
|
||||
if (onPendingRequest) {
|
||||
client.setRequestHandler(CreateMessageRequestSchema, (request) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue