Skip to content

Commit 07730ad

Browse files
fix(providers): fill blank question option descriptions
1 parent 896d89c commit 07730ad

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,13 +3267,9 @@ export function claudeUserInputQuestions(
32673267
const optionRecord = option as Record<string, unknown>;
32683268
const label = typeof optionRecord.label === "string" ? optionRecord.label.trim() : "";
32693269
if (label.length === 0) return [];
3270-
return [
3271-
{
3272-
label,
3273-
description:
3274-
typeof optionRecord.description === "string" ? optionRecord.description.trim() : "",
3275-
},
3276-
];
3270+
const description =
3271+
typeof optionRecord.description === "string" ? optionRecord.description.trim() : "";
3272+
return [{ label, description: description || label }];
32773273
})
32783274
: [];
32793275
return [

‎packages/provider-pi/src/server/adapter.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3189,7 +3189,11 @@ function piQuestion(
31893189
method === "select" && Array.isArray(event["options"])
31903190
? event["options"]
31913191
.filter((option): option is string => typeof option === "string")
3192-
.map((option) => ({ label: option || "Empty value", description: option, value: option }))
3192+
.map((option) => ({
3193+
label: option || "Empty value",
3194+
description: option || "Empty value",
3195+
value: option,
3196+
}))
31933197
: method === "editor"
31943198
? []
31953199
: [

0 commit comments

Comments
 (0)