feat: enhance wiki-link documentation and fix ChatPlanArea height updates

- Expand SystemPrompt wiki-link guidance with examples and common mistakes
- Add ResizeObserver to ChatPlanArea for dynamic height adjustments
- Improve plan completion summary prompt with more context requirements
This commit is contained in:
Andrew Beal 2026-01-29 13:32:23 +00:00
parent be5dbb9abc
commit 638b229239
3 changed files with 47 additions and 9 deletions

View file

@ -142,13 +142,27 @@ If you see JSON preceded by "Historical tool call/result", it documents a past a
### 4. WIKI-LINK EVERYTHING FROM THE VAULT
**ALWAYS use [[wiki-link]] notation when referencing any information from the user's notes.**
**ALWAYS use [[double-bracket]] wiki-link syntax when referencing anything from the user's vault.**
- Every mention of a note, concept, person, or topic from the vault must be linked
- This builds the knowledge graph and helps users navigate their information
- Use the exact note name as it appears in the vault
This is a hard requirement, not a suggestion. The format is: \`[[Note Name]]\`
Examples:
**What to wiki-link:**
- Note titles: [[Project Alpha]], [[Meeting Notes]]
- People mentioned in notes: [[Sarah]], [[John]]
- Concepts and topics from the vault: [[Machine Learning]], [[Budget Planning]]
- Any entity that exists as a note or could become one
**Correct vs. Incorrect:**
| Wrong | Correct |
|----------|-----------|
| "your Project Alpha notes" | "your [[Project Alpha]] notes" |
| "\`Project Alpha\`" | "[[Project Alpha]]" |
| "the Sarah note" | "the [[Sarah]] note" |
| "*Meeting Notes*" | "[[Meeting Notes]]" |
**Why this matters:** Wiki-links build the knowledge graph and enable navigation. Backticks, italics, quotes, or plain text do NOT create links in Obsidian only \`[[double brackets]]\` work.
**Examples in context:**
- "Based on your [[Project Alpha]] notes, the deadline is next month"
- "[[Sarah]] mentioned this in her meeting with [[John]]"
- "This relates to your ideas about [[Machine Learning]] in [[Research Notes]]"

View file

@ -1,7 +1,7 @@
<script lang="ts">
import { setElementIcon } from "Helpers/ElementHelper";
import Spinner from "./Spinner.svelte";
import { tick } from "svelte";
import { tick, onDestroy } from "svelte";
import { fade, slide } from "svelte/transition";
import type { IExecutionPlanState } from "Stores/ExecutionPlanStore";
import type { Writable } from "svelte/store";
@ -18,13 +18,17 @@
let contentDiv: HTMLDivElement;
let stepElements: (HTMLDivElement | null)[] = [];
let isTransitioning = false;
let resizeObserver: ResizeObserver | null = null;
$: steps = $executionPlanState.plan?.executionSteps;
$: activeStepIndex = $executionPlanState.currentStepIndex;
$: if (steps) {
tick().then(updateHeight);
setTimeout(updateHeight, 500);
}
$: if (contentDiv) {
setupResizeObserver();
}
$: if (activeStepIndex >= 0 && !isTransitioning) {
@ -45,6 +49,18 @@
wrapperDiv.addEventListener('transitionend', onTransitionEnd);
}
function setupResizeObserver() {
if (resizeObserver) {
resizeObserver.disconnect();
}
resizeObserver = new ResizeObserver(() => {
updateHeight();
});
resizeObserver.observe(contentDiv);
}
async function updateHeight() {
const firstStep = stepElements[0];
if (!contentDiv || !firstStep) {
@ -61,8 +77,16 @@
collapsedHeight = (stepsToShow * stepHeight) + (Math.max(0, stepsToShow - 1) * separatorHeight);
}
onDestroy(() => {
if (resizeObserver) {
resizeObserver.disconnect();
}
});
async function scrollToActiveStep() {
if (!wrapperDiv || !$executionPlanState.plan || activeStepIndex === -1) return;
if (!wrapperDiv || !$executionPlanState.plan || activeStepIndex === -1) {
return;
}
await tick();
const stepElement = stepElements[activeStepIndex];

View file

@ -111,7 +111,7 @@ export enum Copy {
OrchestrationSignalRequired = "You must signal a decision: continue with the next step, request a replan, or abort execution.",
TextResponseToolDenial = "Tool calls are not permitted for this request. Provide a text response instead.",
TextResponseRequired = "A text response is required. Please provide your response.",
RequestPlanSummary = "All steps have been executed. Provide a concise summary of what was accomplished for the user.",
RequestPlanSummary = "The workflow has completed. Provide a concise summary for the user that covers: (1) what was originally planned, (2) what was actually accomplished, and (3) any notable outcomes or issues. Reference the execution agent outputs and step results for context.",
PlanningFailedNoSteps = "The planned workflow has failed, however steps may have been completed. Consult with the user on how to continue.",
WorkflowFailedAtStep = "The planned workflow failed when executing step '{stepDescription}'. Consult with the user on how to continue.",
WorkflowAborted = "The planned workflow was aborted. Result: {abortContext}",