Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/renderer/src/components/ChatInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ const editor = new Editor({
class:
'mention px-1.5 py-0.5 text-xs rounded-md bg-secondary text-foreground inline-block max-w-64 align-sub !truncate'
},
suggestion
suggestion,
deleteTriggerWithBackspace: true
}),
Comment on lines +283 to 285
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Type-safety: ensure the custom Mention options include deleteTriggerWithBackspace

If ./editor/mention/mention defines typed options, add deleteTriggerWithBackspace?: boolean to avoid “unknown property” issues and keep editor config self-documented.

Run this to verify the option is implemented and typed in the custom extension:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate custom mention extension sources
FILES=$(fd -a --type f 'mention.*\.(ts|tsx|js|jsx)' src || true)
echo "Candidate Mention files:"
echo "$FILES"

echo
echo "Searching for implementation of deleteTriggerWithBackspace..."
rg -nP '\bdeleteTriggerWithBackspace\b' $FILES || echo "Not found in implementation."

echo
echo "Checking for typed options containing deleteTriggerWithBackspace..."
rg -nPU '(?s)interface\s+\w*Options\b.*?\bdeleteTriggerWithBackspace\??\s*:\s*boolean' $FILES || echo "Type not found — add it to the extension Options interface."

Length of output: 1130


Add deleteTriggerWithBackspace to Mention extension Options
In src/renderer/src/components/editor/mention/mention.ts, extend the Options interface with

deleteTriggerWithBackspace?: boolean

and implement support for it in the extension to avoid “unknown property” errors when configuring the editor.

🤖 Prompt for AI Agents
In src/renderer/src/components/ChatInput.vue around lines 283-285 and in
src/renderer/src/components/editor/mention/mention.ts, the Mention extension is
being configured with deleteTriggerWithBackspace but the Options interface lacks
that property; update the Options interface in mention.ts to include
deleteTriggerWithBackspace?: boolean, add handling in the extension
implementation to read the option (use a sensible default, e.g., false) and wire
it into the extension behavior so passing deleteTriggerWithBackspace no longer
triggers "unknown property" errors.

Placeholder.configure({
placeholder: () => {
Expand Down