How dpwqb/office-ai-addin works
Office AI Add-in provides one task pane for Excel, Word, and PowerPoint. A user configures a provider or asks a question; the UI sends chat requests through an OpenAI-compatible agent loop, which can invoke tools exposed by the selected host adapter. Those tools read or modify the Office document, and citations or follow mode can navigate the view. The README documents these capabilities and relationships; source excerpts were unavailable, so uncertain internal call paths are omitted.
Main entry points: ui.js UI and Settings · host.js Host Delegation · app.js App Bootstrap · api.js Agent Loop
Components 16
Task Pane
- Task Pane Entry
taskpane.html - App Bootstrap
assets/js/app.js - UI and Settings
assets/js/ui.js - Ribbon Commands
assets/js/commands.js
AI Agent
- Agent Loop
assets/js/api.js - AI Provider API
Shared Services
- Provider Config
assets/js/config.js - Session and Preferences
assets/js/state.js - Browser Storage
- Markdown Renderer
assets/js/markdown.js
Office Hosts
- Host Delegation
assets/js/host.js - Excel Tools
assets/js/host-excel.js - Word Tools
assets/js/host-word.js - PowerPoint Tools
assets/js/host-powerpoint.js
Other components
- User
- Office Document
Connections 19
- User → UI and Settings: uses
- Task Pane Entry → App Bootstrap: loads
- App Bootstrap → Host Delegation: selects host
- App Bootstrap → UI and Settings: renders
- UI and Settings → Agent Loop: sends chat
- Agent Loop → AI Provider API: requests completion
- Agent Loop → Host Delegation: uses tools
- Host Delegation → Excel Tools: dispatches
- Host Delegation → Word Tools: dispatches
- Host Delegation → PowerPoint Tools: dispatches
- Excel Tools → Office Document: reads or writes
- Word Tools → Office Document: reads or writes
- PowerPoint Tools → Office Document: reads or writes
- UI and Settings → Session and Preferences: reads or updates
- Session and Preferences → Browser Storage: persists
- UI and Settings → Provider Config: reads settings
- UI and Settings → Markdown Renderer: renders messages
- UI and Settings → Host Delegation: navigates citations
- User → Ribbon Commands: invokes