fix(opencode): improve skills dialog readability (#12356)
This commit is contained in:
@@ -18,9 +18,10 @@ export function DialogSkill(props: DialogSkillProps) {
|
|||||||
|
|
||||||
const options = createMemo<DialogSelectOption<string>[]>(() => {
|
const options = createMemo<DialogSelectOption<string>[]>(() => {
|
||||||
const list = skills() ?? []
|
const list = skills() ?? []
|
||||||
|
const maxWidth = Math.max(0, ...list.map((s) => s.name.length))
|
||||||
return list.map((skill) => ({
|
return list.map((skill) => ({
|
||||||
title: skill.name,
|
title: skill.name.padEnd(maxWidth),
|
||||||
description: skill.description,
|
description: skill.description?.replace(/\s+/g, " ").trim(),
|
||||||
value: skill.name,
|
value: skill.name,
|
||||||
category: "Skills",
|
category: "Skills",
|
||||||
onSelect: () => {
|
onSelect: () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user