diff --git a/internal/web/dist/index.html b/internal/web/dist/index.html index e754d5c..d3a56c0 100644 --- a/internal/web/dist/index.html +++ b/internal/web/dist/index.html @@ -11,30 +11,30 @@ - - + + - - - - - - + + + + + +
+ +
+
+

Wiki

+
+ + +
+ +
+ + {#if searching} +
+
+ {#each Array(3) as _} +
+ {/each} +
+
+ {:else if searchResults !== null} + +
+
+

Search Results

+
+ {#if searchResults.length === 0} +
+ No articles found for "{searchQuery}" +
+ {:else} + + {/if} +
+ {:else if loadingData} +
+ {#each Array(5) as _} +
+ {/each} +
+ {:else if mapData} + + {#if mapData.hubs?.length > 0} + + {/if} + + +
+
+

All Articles

+

Sorted by last updated

+
+ {#if !mapData.articles?.length} +
+ No articles yet. Agents can create articles via MCP tools. +
+ {:else} + + {/if} +
+ + + {#if mapData.orphans?.length > 0} +
+ + {#if orphansExpanded} + + {/if} +
+ {/if} + + + {#if mapData.wanted?.length > 0} +
+
+

Wanted Articles

+

Referenced but not yet created

+
+ +
+ {/if} + {/if} +
diff --git a/web/src/routes/wiki/[slug]/+page.svelte b/web/src/routes/wiki/[slug]/+page.svelte new file mode 100644 index 0000000..c37109d --- /dev/null +++ b/web/src/routes/wiki/[slug]/+page.svelte @@ -0,0 +1,465 @@ + + +{#if loadingData} +
+
+
+
+
+
+
+{:else if notFound} +
+
+
+ + + +
+

Article Not Found

+

+ The article {slug} doesn't exist yet. +

+

+ Agents can create this article using the wiki_write MCP tool. +

+ {#if backlinks.length > 0} +
+

Referenced by

+
+ {#each backlinks as link} + + {link.title || link.slug} + + {/each} +
+
+ {/if} +
+ +
+{:else if article} +
+ +
+ Wiki + / + {article.title} +
+ +
+ +
+

{article.title}

+ + +
+ Updated {formatTime(article.updated_at)} + + Rev {article.revision} + + by {article.author} + {#if article.word_count} + + {article.word_count} words + {/if} + + + + + + History + +
+ + +
+
+ {@html renderedBody} +
+
+ + +
+ {#if backlinks.length > 0} +
+

+ + + + Backlinks + {backlinks.length} +

+
+ {#each backlinks as link} + + {link.title || link.slug} + + {/each} +
+
+ {/if} + {#if outgoingLinks.length > 0} +
+

+ + + + Outgoing Links + {outgoingLinks.length} +

+ +
+ {/if} +
+
+
+
+{/if} + + diff --git a/web/src/routes/wiki/[slug]/history/+page.svelte b/web/src/routes/wiki/[slug]/history/+page.svelte new file mode 100644 index 0000000..cc2bc91 --- /dev/null +++ b/web/src/routes/wiki/[slug]/history/+page.svelte @@ -0,0 +1,153 @@ + + +
+ +
+ Wiki + / + {articleTitle || slug} + / + History +
+ +
+
+

Revision History

+

+ {articleTitle || slug} +

+
+
+ + {#if loadingData} +
+ {#each Array(5) as _} +
+ {/each} +
+ {:else if revisions.length === 0} +
+ No revisions found. +
+ {:else} +
+ + +
+ {#each revisions as rev, i} + {@const prevWordCount = i < revisions.length - 1 ? revisions[i + 1]?.word_count : undefined} +
+ + {#if expandedRevision === rev.revision} +
+
+ {rev.body ?? '(no body)'} +
+
+ {/if} +
+ {/each} +
+
+ {/if} +