@eigenpal/docx-editor-agents/vue

Vue entry. Components and composables that need Vue as a peer dependency.

Parity with the React adapter: same prop and event names where possible. Where React passes ReactNode props (icon, emptyState, footnote), the Vue components use idiomatic named slots. See each component's JSDoc for the slot list. AgentComposer follows the standard Vue 3 v-model contract (modelValue / update:modelValue).

Editor i18n: <DocxEditor :i18n="..." /> does NOT translate agent UI strings. These components own their own English defaults from packages/agents/i18n/en.json. Wire your t() results to the *Label / labels props for translation:

vue <AgentPanel :title="t('agentPanel.defaultTitle')" :close-label="t('agentPanel.close')" />

Functions (1)

useAgentBridgefunctionSource ↗

export declare function useAgentBridge(options: UseAgentBridgeOptions): UseAgentBridgeReturn;

Interfaces (10)

AgentChatLogPropsinterfaceSource ↗

export interface AgentChatLogProps
MemberTypeSummary
autoScroll?boolean
className?string
earlierLabel?(count: number) => string
error?string | null
humanizeToolName?(name: string) => string
loading?boolean
maxVisibleCalls?number
messagesAgentMessage[]
summaryLabel?(count: number) => string
thinkingLabel?string
workingLabel?(count: number) => string

AgentComposerPropsinterfaceSource ↗

export interface AgentComposerProps
MemberTypeSummary
className?string
disabled?boolean
modelValuestring
placeholder?string
sendLabel?string

AgentPanelPropsinterfaceSource ↗

export interface AgentPanelProps
MemberTypeSummary
className?string
closable?booleanShow the header close button. Vue parity for React's `onClose=undefined → no button` pattern: pass `:closable="false"` to hide. Defaults to `true` because Vue's `defineEmits` always declares the `close` event regardless of whether the parent attached `@close`.
closed?boolean
closeLabel?string
defaultWidth?number
maxWidth?number
minWidth?number
resizeHandleLabel?string
title?string
width?number

AgentSuggestionChipPropsinterfaceSource ↗

export interface AgentSuggestionChipProps
MemberTypeSummary
disabled?boolean
labelstring

AgentTimelinePropsinterfaceSource ↗

export interface AgentTimelineProps
MemberTypeSummary
earlierLabel?(count: number) => string
humanizeName?(name: string) => string
maxVisibleCalls?number
streaming?boolean
summaryLabel?(count: number) => string
toolCallsAgentToolCall[]
workingLabel?(count: number) => string

AIContextMenuPropsinterface

export interface AIContextMenuProps
MemberTypeSummary
isOpenboolean
labels?AIContextMenuLabels
position{ x: number; y: number; }
selectedTextstring
showCustomPrompt?boolean

AIResponsePreviewPropsinterface

export interface AIResponsePreviewProps
MemberTypeSummary
actionstring
allowEdit?boolean
error?string
isLoadingboolean
isVisibleboolean
labels?AIResponsePreviewLabels
originalTextstring
responseTextstring
showDiff?boolean
showRetry?boolean

EditorRefLikeinterfaceSource ↗

Agent-bridge contract every editor adapter (React, Vue, future) MUST satisfy. Versioning: additions are coordinated minor bumps across the fixed group; signature changes / removals are major. See openspec/changes/vue-editor-robust-implementation/design.md Decision 18.

interface EditorRefLike
MemberTypeSummary
addComment
applyFormattingApply character formatting to a paragraph or sub-range. Returns false on missing paraId / ambiguous search.
findInDocument
getComments
getCurrentPage1-indexed page the user's cursor / selection is on. 0 if unknown.
getDocument
getEditorRef
getPageContentRead a single page's paragraphs (1-indexed). Returns null if the page does not exist.
getSelectionInfo
getTotalPagesTotal number of pages currently rendered.
insertBreakInsert a page or section break after the paragraph. Returns false if paraId is unknown.
onContentChange
onSelectionChange
proposeChange
replyToComment
resolveComment
scrollToParaId
setParagraphStyleApply a paragraph style by styleId. Returns false if paraId is unknown.

UseAgentBridgeOptionsinterfaceSource ↗

export interface UseAgentBridgeOptions
MemberTypeSummary
author?MaybeRef<string>Default author for comments and tracked changes. Accepts a plain string or a `Ref<string>`/computed — bridge rebuilds when the value changes (matches React's `useMemo([editorRef, author])` shape). Defaults to `'AI'`.
editorRefRef<EditorRefLike | null | undefined>Vue ref pointing at the DocxEditor instance (must match `EditorRefLike`).

UseAgentBridgeReturninterfaceSource ↗

export interface UseAgentBridgeReturn
MemberTypeSummary
executeToolCall(toolName: string, input: Record<string, unknown>) => AgentToolResult
toolSchemasReturnType<typeof getToolSchemas>

Variables (7)

AgentChatLogconstSource ↗

_default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>

AgentComposerconstSource ↗

_default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>

AgentPanelconstSource ↗

_default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>

AgentSuggestionChipconstSource ↗

_default: import('vue').DefineComponent<AgentSuggestionChipProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
    click: () => any;
}, string, import('vue').PublicProps, Readonly<AgentSuggestionChipProps> & Readonly<{
    onClick?: (() => any) | undefined;
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>

AgentTimelineconstSource ↗

_default: import('vue').DefineComponent<AgentTimelineProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AgentTimelineProps> & Readonly<{}>, {
    streaming: boolean;
    maxVisibleCalls: number;
    humanizeName: (name: string) => string;
    workingLabel: (count: number) => string;
    summaryLabel: (count: number) => string;
    earlierLabel: (count: number) => string;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>

AIContextMenuconstSource ↗

_default: import('vue').DefineComponent<AIContextMenuProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
    close: () => any;
    action: (action: string, customPrompt?: string | undefined) => any;
}, string, import('vue').PublicProps, Readonly<AIContextMenuProps> & Readonly<{
    onClose?: (() => any) | undefined;
    onAction?: ((action: string, customPrompt?: string | undefined) => any) | undefined;
}>, {
    showCustomPrompt: boolean;
    labels: AIContextMenuLabels;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>

AIResponsePreviewconstSource ↗

_default: import('vue').DefineComponent<AIResponsePreviewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
    accept: (text: string) => any;
    reject: () => any;
    retry: () => any;
}, string, import('vue').PublicProps, Readonly<AIResponsePreviewProps> & Readonly<{
    onAccept?: ((text: string) => any) | undefined;
    onReject?: (() => any) | undefined;
    onRetry?: (() => any) | undefined;
}>, {
    error: string;
    labels: AIResponsePreviewLabels;
    allowEdit: boolean;
    showDiff: boolean;
    showRetry: boolean;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>

On this page