MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / handleJump

Function handleJump

frontend/src/components/modelsPage/index.tsx:174–185  ·  view source on GitHub ↗
(value: RecordType)

Source from the content-addressed store, hash-verified

172 }
173
174 const handleJump = async (value: RecordType) => {
175 dispatch(setLoading(true));
176 localStorage.setItem('modelSchemaId', value.model_schema_id)
177 localStorage.setItem('providerId', value.provider_id)
178 const res = await getModelSchema(value.model_schema_id)
179 localStorage.setItem('allowedConfigs', JSON.stringify(res.data.allowed_configs))
180 const res1 = await getModelsForm(value.model_id)
181 localStorage.setItem('streaming', JSON.stringify(res1.data.properties.streaming))
182 dispatch(setLoading(false));
183 dispatch(setPlaygroundSelect('chat_completion'))
184 navigate(`/project/playground?model_id=${value.model_id}&model_name=${value.name}`)
185 }
186 const handleDeleteValue = (e: ChangeEvent<HTMLInputElement>) => {
187 setDeleteValue(e.target.value)
188 if (e.target.value === record.name) {

Callers 1

ModelsPageFunction · 0.70

Calls 4

setLoadingFunction · 0.90
getModelSchemaFunction · 0.90
getModelsFormFunction · 0.90
setPlaygroundSelectFunction · 0.90

Tested by

no test coverage detected