Skip to content

Commit

Permalink
fix: app does not reload model when prompt template is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-menlo committed Jan 29, 2025
1 parent 0108020 commit ed6d55f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions extensions/engine-management-extension/rolldown.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default defineConfig([
NODE: JSON.stringify(`${pkgJson.name}/${pkgJson.node}`),
API_URL: JSON.stringify('http://127.0.0.1:39291'),
SOCKET_URL: JSON.stringify('ws://127.0.0.1:39291'),
CORTEX_ENGINE_VERSION: JSON.stringify('v0.1.46'),
CORTEX_ENGINE_VERSION: JSON.stringify('v0.1.49'),
DEFAULT_REMOTE_ENGINES: JSON.stringify(engines),
DEFAULT_REMOTE_MODELS: JSON.stringify(models),
},
Expand All @@ -26,7 +26,7 @@ export default defineConfig([
file: 'dist/node/index.cjs.js',
},
define: {
CORTEX_ENGINE_VERSION: JSON.stringify('v0.1.46'),
CORTEX_ENGINE_VERSION: JSON.stringify('v0.1.49'),
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion extensions/inference-cortex-extension/rolldown.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default defineConfig([
SETTINGS: JSON.stringify(defaultSettingJson),
CORTEX_API_URL: JSON.stringify('http://127.0.0.1:39291'),
CORTEX_SOCKET_URL: JSON.stringify('ws://127.0.0.1:39291'),
CORTEX_ENGINE_VERSION: JSON.stringify('v0.1.46'),
CORTEX_ENGINE_VERSION: JSON.stringify('v0.1.49'),
},
},
{
Expand Down
3 changes: 3 additions & 0 deletions web/containers/ModelDropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import {
activeThreadAtom,
setThreadModelParamsAtom,
} from '@/helpers/atoms/Thread.atom'
import { useActiveModel } from '@/hooks/useActiveModel'

Check failure on line 57 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-macos

`@/hooks/useActiveModel` import should occur before import of `@/hooks/useCreateNewThread`

Check failure on line 57 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-ubuntu

`@/hooks/useActiveModel` import should occur before import of `@/hooks/useCreateNewThread`

Check failure on line 57 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-windows-pr

`@/hooks/useActiveModel` import should occur before import of `@/hooks/useCreateNewThread`

Check failure on line 57 in web/containers/ModelDropdown/index.tsx

View workflow job for this annotation

GitHub Actions / coverage-check

`@/hooks/useActiveModel` import should occur before import of `@/hooks/useCreateNewThread`

type Props = {
chatInputMode?: boolean
Expand Down Expand Up @@ -93,6 +94,7 @@ const ModelDropdown = ({
const { updateModelParameter } = useUpdateModelParameters()
const searchInputRef = useRef<HTMLInputElement>(null)
const configuredModels = useAtomValue(configuredModelsAtom)
const { stopModel } = useActiveModel()

const featuredModels = configuredModels.filter(
(x) =>
Expand Down Expand Up @@ -226,6 +228,7 @@ const ModelDropdown = ({
const model = downloadedModels.find((m) => m.id === modelId)
setSelectedModel(model)
setOpen(false)
stopModel()

if (activeThread) {
// Change assistand tools based on model support RAG
Expand Down

0 comments on commit ed6d55f

Please sign in to comment.