Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: small ux fix on obsidian pipe

Louis Beaumont661dd1245019
diff --git a/pipes/obsidian/src/app/api/log/route.ts b/pipes/obsidian/src/app/api/log/route.ts
index 3eb36cdb8..dd7cf0e9c 100644
--- a/pipes/obsidian/src/app/api/log/route.ts
+++ b/pipes/obsidian/src/app/api/log/route.ts
@@ -52,8 +52,8 @@ async function extractLinkedContent(
// Find the vault root first
const vaultRoot = await findVaultRoot(basePath);
- // Match [[file]] or [[folder/file]] patterns
- const linkRegex = /\[\[(.*?)\]\]/g;
+ // Match @[[file]] or @[[folder/file]] patterns
+ const linkRegex = /@\[\[(.*?)\]\]/g;
const matches = [...prompt.matchAll(linkRegex)];
let enrichedPrompt = prompt;
@@ -68,7 +68,7 @@ async function extractLinkedContent(
try {
const content = await readObsidianFile(fullPath);
- // Replace the [[link]] with actual content
+ // Replace the @[[link]] with actual content
enrichedPrompt = enrichedPrompt.replace(
match[0],
`\n--- Content of ${relativePath} ---\n${content}\n---\n`
diff --git a/pipes/obsidian/src/components/obsidian-settings.tsx b/pipes/obsidian/src/components/obsidian-settings.tsx
index d624e5125..6a4b2b2c3 100644
--- a/pipes/obsidian/src/components/obsidian-settings.tsx
+++ b/pipes/obsidian/src/components/obsidian-settings.tsx
@@ -402,6 +402,13 @@ export function ObsidianSettings() {
[]
);
+ // Add this new useEffect for initial path validation
+ useEffect(() => {
+ if (settings?.customSettings?.obsidian?.path) {
+ validatePath(settings.customSettings.obsidian.path);
+ }
+ }, [settings?.customSettings?.obsidian?.path, validatePath]);
+
if (loading) {
return (
<div className="w-full max-w-4xl mx-auto space-y-8">