Skip to content
Merged
Show file tree
Hide file tree
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
54 changes: 54 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Sourcegraph Docs - Agent Instructions

## Build Commands

- **Type Check**: `npx tsc --noEmit`
- **Build**: `npm run build`
- **Dev**: `npm run dev`
- **Lint**: `npm run lint`

## AI Chat Integration

This site uses **runLLM** for the AI chat widget. The integration is implemented via:

- **Location**: `src/app/layout.tsx`
- **Widget**: runLLM script loaded via Next.js `<Script>` component
- **Configuration**:
- Position: BOTTOM_RIGHT
- Theme color: #FF5543 (Sourcegraph brand color)
- Button text: "Ask AI"
- Keyboard shortcut: Mod+j

### runLLM Configuration

To update the runLLM assistant ID or other settings, modify the Script component in `src/app/layout.tsx`:

```tsx
<Script
id="runllm-widget-script"
type="module"
src="https://widget.runllm.com"
crossOrigin=""
runllm-keyboard-shortcut="Mod+j"
runllm-name="Sourcegraph AI Assistant"
runllm-position="BOTTOM_RIGHT"
runllm-assistant-id="YOUR_ASSISTANT_ID" // Update this
runllm-theme-color="#FF5543"
runllm-floating-button-text="Ask AI"
async
/>
```

### Previous Integration

Previously used **Langbase** with custom React components. This has been completely removed:
- Removed `@langbase/components` and `langbase` packages
- Removed custom chat components (`src/app/chat.tsx`, `src/components/ChatBot/`)
- Removed API routes (`src/app/api/chat/`)
- Removed memory creation scripts

## Important Notes

- **Assistant ID**: The `runllm-assistant-id` is currently set to "YOUR_ASSISTANT_ID" and needs to be updated with the actual Sourcegraph runLLM assistant ID
- **Deployment**: After updating the assistant ID, add the deployment URL to the runLLM dashboard
- **Styling**: The widget inherits the site's theme and uses the Sourcegraph brand color (#FF5543)
Loading