Ghostwriter#166
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces "Ghostwriter," an AI-powered chat assistant that helps users with job application tasks. The feature integrates LLM capabilities directly into the job details view, allowing users to ask questions about specific jobs and get tailored responses based on their profile and the job description.
Changes:
- Adds complete chat infrastructure with database tables for threads, messages, and runs
- Implements streaming chat responses with cancellation support
- Adds chat style preferences (tone, formality, constraints) to settings
- Integrates Ghostwriter UI into job detail panels with a drawer interface
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| shared/src/types.ts | Adds chat message, thread, run types and stream event types |
| shared/src/settings-schema.ts | Adds validation for chat style settings (tone, formality, constraints, do-not-use) |
| shared/src/testing/factories.ts | Adds default chat style values to AppSettings factory |
| orchestrator/src/server/services/ghostwriter.ts | Core service handling chat operations, streaming, and cancellation |
| orchestrator/src/server/services/ghostwriter-context.ts | Builds chat context from job and profile data with truncation limits |
| orchestrator/src/server/services/llm/types.ts | Adds AbortSignal support for LLM request cancellation |
| orchestrator/src/server/services/llm/service.ts | Implements signal passing for fetch abortion |
| orchestrator/src/server/services/settings.ts | Adds chat style settings resolution |
| orchestrator/src/server/services/settings-update/registry.ts | Registers chat style settings for persistence |
| orchestrator/src/server/services/settings-conversion.ts | Defines chat style settings with env var defaults |
| orchestrator/src/server/repositories/ghostwriter.ts | Database operations for threads, messages, and runs |
| orchestrator/src/server/repositories/settings.ts | Adds chat style setting keys |
| orchestrator/src/server/db/schema.ts | Defines three new tables with appropriate foreign keys and indexes |
| orchestrator/src/server/db/migrate.ts | Creates chat tables and indexes with proper constraints |
| orchestrator/src/server/api/routes/ghostwriter.ts | REST and SSE endpoints for chat operations |
| orchestrator/src/server/api/routes/ghostwriter.test.ts | Basic API tests with mocked service layer |
| orchestrator/src/server/api/routes.ts | Registers ghostwriter routes under /jobs/:id/chat |
| orchestrator/src/components/ui/button.tsx | Adds cursor-pointer class for better UX |
| orchestrator/src/client/pages/settings/types.ts | Adds ChatValues type for settings form |
| orchestrator/src/client/pages/settings/components/ChatSettingsSection.tsx | Settings UI for chat style preferences |
| orchestrator/src/client/pages/orchestrator/JobDetailPanel.tsx | Removes trailing whitespace |
| orchestrator/src/client/pages/SettingsPage.tsx | Integrates ChatSettingsSection |
| orchestrator/src/client/pages/OrchestratorPage.test.tsx | Updates test expectation for Shift+? hotkey behavior |
| orchestrator/src/client/pages/JobPage.tsx | Adds GhostwriterDrawer to job details page |
| orchestrator/src/client/hooks/useHotkeys.ts | Fixes Shift-only shortcuts to respect input guard |
| orchestrator/src/client/components/ghostwriter/*.tsx | React components for chat UI (drawer, panel, composer, messages, streaming) |
| orchestrator/src/client/components/ReadyPanel.tsx | Replaces "View PDF" button with Ghostwriter, moves View PDF to dropdown |
| orchestrator/src/client/api/client.ts | Implements SSE streaming and chat API methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 39 out of 39 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 39 out of 39 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* initlal commit * Ghostwriter always enabled * rename code * ghostwriter panel * separate component * ui improvements * single thread * copy improvement * dont pop up keyboard shortcuts * markdown renderer * ghostwriter button placement * better UX * ghostwriter copy * meta shortcut * better settings menu * formatting * doocumentation * add tests * race condition * race condition 2 * pass title * more comments * comments * formtting
Uh oh!
There was an error while loading. Please reload this page.