From 783cea40c3c4a1b09c4573409573a46222ef65c7 Mon Sep 17 00:00:00 2001 From: david qiu Date: Thu, 7 Mar 2024 10:57:09 -0800 Subject: [PATCH] fix selecting models with a colon in their ID (#682) --- packages/jupyter-ai/src/components/chat-settings.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/jupyter-ai/src/components/chat-settings.tsx b/packages/jupyter-ai/src/components/chat-settings.tsx index fcfa55daa..9650334d0 100644 --- a/packages/jupyter-ai/src/components/chat-settings.tsx +++ b/packages/jupyter-ai/src/components/chat-settings.tsx @@ -404,8 +404,8 @@ function getModelLocalId(globalModelId: string) { return null; } - const components = globalModelId.split(':'); - return components[components.length - 1]; + const components = globalModelId.split(':').slice(1); + return components.join(':'); } function getProvider(