Merge pull request #441 from fredericbarthelet/completion-support-default
Set completion support to false by default
This commit is contained in:
commit
56ef795d86
1 changed files with 2 additions and 2 deletions
|
|
@ -91,7 +91,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) => [
|
||||
|
|
@ -505,7 +505,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