diff --git a/studio/frontend/src/features/studio/sections/dataset-section.tsx b/studio/frontend/src/features/studio/sections/dataset-section.tsx
index e3f50efb40..97bd1304f0 100644
--- a/studio/frontend/src/features/studio/sections/dataset-section.tsx
+++ b/studio/frontend/src/features/studio/sections/dataset-section.tsx
@@ -109,7 +109,7 @@ export function DatasetSection() {
const resultIds = useMemo(() => {
const ids = hfResults.map((r) => r.id);
if (dataset && !ids.includes(dataset)) {
- ids.unshift(dataset);
+ ids.push(dataset);
}
return ids;
}, [hfResults, dataset]);
@@ -159,7 +159,20 @@ export function DatasetSection() {
-
+
{
+ if (event.key !== "Enter") return;
+ if (!(event.target instanceof HTMLInputElement)) return;
+ event.preventDefault();
+ if (hfResults.length > 0) {
+ handleDatasetSelect(hfResults[0].id);
+ } else {
+ const text = event.target.value.trim();
+ if (text) handleDatasetSelect(text);
+ }
+ }}
+ >
id}
autoHighlight={true}
>
-
+
diff --git a/studio/frontend/src/features/studio/sections/model-section.tsx b/studio/frontend/src/features/studio/sections/model-section.tsx
index 32810e0700..501a4a41e3 100644
--- a/studio/frontend/src/features/studio/sections/model-section.tsx
+++ b/studio/frontend/src/features/studio/sections/model-section.tsx
@@ -160,7 +160,7 @@ export function ModelSection() {
const resultIds = useMemo(() => {
const ids = hfResults.map((r) => r.id);
if (selectedModel && !ids.includes(selectedModel)) {
- ids.unshift(selectedModel);
+ ids.push(selectedModel);
}
return ids;
}, [hfResults, selectedModel]);
@@ -375,7 +375,20 @@ export function ModelSection() {
-
+
{
+ if (event.key !== "Enter") return;
+ if (!(event.target instanceof HTMLInputElement)) return;
+ event.preventDefault();
+ if (hfResults.length > 0) {
+ handleModelSelect(hfResults[0].id);
+ } else {
+ const text = event.target.value.trim();
+ if (text) handleModelSelect(text);
+ }
+ }}
+ >