Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

feat(open-knowledge): scenario-aware create suggestions + starter-pack reorder (#2035)

sarah8c0145d871e4
diff --git a/.changeset/empty-state-suggestions-and-pack-order.md b/.changeset/empty-state-suggestions-and-pack-order.md
new file mode 100644
index 000000000..67d60ffc3
--- /dev/null
+++ b/.changeset/empty-state-suggestions-and-pack-order.md
@@ -0,0 +1,7 @@
+---
+"@inkeep/open-knowledge": patch
+---
+
+Polish the create empty state and reorder the starter packs.
+
+The starter-prompt pills below the create composer now show only when starting a fresh project — on an existing repo the composer stays focused on a free-form brief, while the embedded copy-a-prompt list (shown when Open Knowledge runs inside a coding agent) keeps its suggestions in both cases. Tightened the spacing so the "Add a starter pack" and "create a new file" links sit just under the templates list instead of floating below it. In the starter-pack picker, the Worldbuilding and Open Knowledge Format packs swapped places.
diff --git a/packages/app/src/components/empty-state/CreatePromptComposer.tsx b/packages/app/src/components/empty-state/CreatePromptComposer.tsx
index ddedb27ad..1085c97b7 100644
--- a/packages/app/src/components/empty-state/CreatePromptComposer.tsx
+++ b/packages/app/src/components/empty-state/CreatePromptComposer.tsx
@@ -276,26 +276,30 @@ export function CreatePromptComposer({ scenario, className }: CreatePromptCompos
</div>
{/* Starter-brief chips — below the card, centered. Clicking one prefills
the field (no auto-create), so they read as suggestions rather than
- card actions. Wraps on narrow widths. */}
- <div className="flex flex-wrap items-center justify-center gap-2">
- {suggestions.map((suggestion) => {
- const Icon = suggestion.icon;
- return (
- <Button
- key={suggestion.id}
- type="button"
- variant="outline"
- size="sm"
- onClick={() => applySuggestion(suggestion.prompt)}
- className="gap-1.5 rounded-md font-normal text-muted-foreground hover:text-foreground"
- data-testid={`create-suggestion-${suggestion.id}`}
- >
- <Icon className="size-3.5" aria-hidden="true" />
- {suggestion.label}
- </Button>
- );
- })}
- </div>
+ card actions. Wraps on narrow widths. Suppressed for `existing-repo`:
+ the repo's own contents are the starting point, so we don't pitch
+ generic prefills there (the embedded copy-list still shows them). */}
+ {scenario !== 'existing-repo' && suggestions.length > 0 ? (
+ <div className="flex flex-wrap items-center justify-center gap-2">
+ {suggestions.map((suggestion) => {
+ const Icon = suggestion.icon;
+ return (
+ <Button
+ key={suggestion.id}
+ type="button"
+ variant="outline"
+ size="sm"
+ onClick={() => applySuggestion(suggestion.prompt)}
+ className="gap-1.5 rounded-md font-normal text-muted-foreground hover:text-foreground"
+ data-testid={`create-suggestion-${suggestion.id}`}
+ >
+ <Icon className="size-3.5" aria-hidden="true" />
+ {suggestion.label}
+ </Button>
+ );
+ })}
+ </div>
+ ) : null}
</div>
);
}
diff --git a/packages/app/src/components/empty-state/CreateView.tsx b/packages/app/src/components/empty-state/CreateView.tsx
index ec1632818..c05c8f8a3 100644
--- a/packages/app/src/components/empty-state/CreateView.tsx
+++ b/packages/app/src/components/empty-state/CreateView.tsx
@@ -26,7 +26,7 @@ export function CreateView({ celebrateSignal, onAddStarterPack }: CreateViewProp
const templatesError = templatesState.status === 'error';
return (
- <div className="flex w-full flex-col gap-10 py-12 max-w-5xl my-auto">
+ <div className="flex w-full flex-col gap-8 py-12 max-w-5xl my-auto">
<EmptyStateHeader
title={t`Create something great.`}
subtitle={
@@ -58,7 +58,10 @@ export function CreateView({ celebrateSignal, onAddStarterPack }: CreateViewProp
/>
) : null}
- <div className="flex w-full items-center justify-between gap-4">
+ {/* Sit the footer links close under the block above — the templates
+ card, or the composer when there are no templates — rather than a
+ full gap-8/gap-10 away. */}
+ <div className="-mt-6 flex w-full items-center justify-between gap-4">
<Button
onClick={onAddStarterPack}
variant="link"
diff --git a/packages/server/src/seed/starter.ts b/packages/server/src/seed/starter.ts
index 84d033102..20a1b2209 100644
--- a/packages/server/src/seed/starter.ts
+++ b/packages/server/src/seed/starter.ts
@@ -1217,13 +1217,18 @@ export const STARTER_PACKS: Readonly<Record<PackId, StarterPack>> = {
folders: PLAIN_NOTES_FOLDERS,
templates: PLAIN_NOTES_TEMPLATES,
},
- worldbuilding: {
- id: 'worldbuilding',
- name: 'Worldbuilding',
- description: 'A wiki for your story world.',
- defaultSubfolder: 'world',
- folders: WORLDBUILDING_FOLDERS,
- templates: WORLDBUILDING_TEMPLATES,
+ okf: {
+ id: 'okf',
+ name: 'Open Knowledge Format',
+ description: "Wiki using Google's Open Knowledge Format.",
+ defaultSubfolder: undefined,
+ folders: OKF_FOLDERS,
+ templates: OKF_TEMPLATES,
+ rootFiles: {
+ 'welcome.md': OKF_WELCOME_MD,
+ 'index.md': OKF_INDEX_MD,
+ 'log.md': OKF_LOG_MD,
+ },
},
'writing-pipeline': {
id: 'writing-pipeline',
@@ -1248,18 +1253,13 @@ export const STARTER_PACKS: Readonly<Record<PackId, StarterPack>> = {
'HEARTBEAT.md': ENTITY_VAULT_HEARTBEAT_MD,
},
},
- okf: {
- id: 'okf',
- name: 'Open Knowledge Format',
- description: "Wiki using Google's Open Knowledge Format.",
- defaultSubfolder: undefined,
- folders: OKF_FOLDERS,
- templates: OKF_TEMPLATES,
- rootFiles: {
- 'welcome.md': OKF_WELCOME_MD,
- 'index.md': OKF_INDEX_MD,
- 'log.md': OKF_LOG_MD,
- },
+ worldbuilding: {
+ id: 'worldbuilding',
+ name: 'Worldbuilding',
+ description: 'A wiki for your story world.',
+ defaultSubfolder: 'world',
+ folders: WORLDBUILDING_FOLDERS,
+ templates: WORLDBUILDING_TEMPLATES,
},
};