diff --git a/studio/frontend/src/features/studio/sections/dataset-section.tsx b/studio/frontend/src/features/studio/sections/dataset-section.tsx
index d7b97c7ad0..d142ae5f54 100644
--- a/studio/frontend/src/features/studio/sections/dataset-section.tsx
+++ b/studio/frontend/src/features/studio/sections/dataset-section.tsx
@@ -114,7 +114,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]);
@@ -164,7 +164,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 9c92755f60..2ba13d739c 100644
--- a/studio/frontend/src/features/studio/sections/model-section.tsx
+++ b/studio/frontend/src/features/studio/sections/model-section.tsx
@@ -165,7 +165,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]);
@@ -380,7 +380,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);
+ }
+ }}
+ >