- {/* Search: Source selector - card style like home action buttons */}
- {config.hasSearchSource && (
-
-
-
- {SEARCH_SOURCES.map((src) => {
- const SrcIcon = src.icon;
- const isSelected =
- !src.comingSoon && searchSource === src.id;
- const card = (
-
- );
- return src.comingSoon ? (
-
-
-
- {card}
-
-
- Coming soon
-
- ) : (
- card
- );
- })}
-
-
- )}
-
- {/* Document templates */}
- {config.hasTemplates && (
-
-
- {DOCUMENT_TEMPLATES.map((tpl) => (
-
- ))}
-
-
- )}
-
- {/* Number of flashcards / questions */}
- {config.countLabel && (
-
-
-
-
setCountInput(e.target.value)}
- placeholder={config.countPlaceholder}
- className="border-0 shadow-none focus-visible:ring-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none [appearance:textfield]"
- />
-
-
-
-
-
-
- )}
-
- {/* Workspace context - separate dialog for picker (scroll works, no layout shift) */}
- {config.hasTopicSelector && items.length > 0 && (
-
-
-
0
- ? `${selectedContextIds.size} item${selectedContextIds.size === 1 ? "" : "s"} selected`
- : "Select items from workspace..."
- }
- readOnly
- onFocus={() => setWorkspacePickerOpen(true)}
- className="w-full min-w-0 cursor-pointer"
- />
- {selectedContextIds.size > 0 && (
-
- {items
- .filter((i) => selectedContextIds.has(i.id))
- .map((item) => (
-
- {item.type === "folder" ? (
-
- ) : (
- getCardTypeIcon(item.type)
- )}
-
- {item.name || "Untitled"}
-
-
-
- ))}
-
- )}
-
- )}
-
- {/* Topic - free text prompt */}
- {config.hasTopicSelector && (
-
-
-
- )}
-
- {/* Simple topic input (when no topic selector) */}
- {!config.hasTopicSelector && (
-
-
- }
- id="prompt-builder-topic"
- placeholder={
- config.inputPlaceholder ?? "e.g. photosynthesis..."
- }
- value={topicInput}
- onChange={(e) => setTopicInput(e.target.value)}
- />
-
- )}
-
-