|
|
@@ -61,7 +61,7 @@ This is the persistent context file for Claude Code. Keep it concise and useful.
|
|
|
- **LRU cache cap**: `itemByID` evicts stale entries past 500 items
|
|
|
- **Reply quote italic**: dim + italic style for reply lines
|
|
|
- **Picker browse mode**: ESC in overlay pickers enters browse mode (j/k/g/G/i) via `pickerBrowseHandleKey`
|
|
|
-- **Link display compression**: `ui.LinkDisplayText()` shows human-friendly labels instead of raw URLs in chat and embeds (e.g., CDN filename, "Tenor GIF", "Substack - author")
|
|
|
+- **Link display compression**: `ui.LinkDisplayText()` shows human-friendly labels instead of raw URLs in chat and embeds; `ui.CdnDisplayName()` cleans attachment filenames (encoded URLs → `image.ext`, UUIDs → `image.ext`); link preview embeds suppressed when URL already in message content (`isLinkPreviewEmbed`); removed `show_attachment_links` config (attachments always show as OSC 8 clickable filenames)
|
|
|
|
|
|
## Adding Link Display Rules
|
|
|
To add a new site-specific URL label, edit `ui.LinkDisplayText()` in `internal/ui/util.go`:
|
|
|
@@ -69,6 +69,8 @@ To add a new site-specific URL label, edit `ui.LinkDisplayText()` in `internal/u
|
|
|
2. Use `segments` (pre-split path segments) to extract meaningful parts (e.g., `segments[1]` for subreddit in `/r/{sub}`)
|
|
|
3. Return a short label string (e.g., `"SiteName - " + segments[1]`)
|
|
|
4. The raw URL is preserved as OSC 8 hyperlink metadata — only the visible text changes
|
|
|
+- CDN filenames also cleaned via `ui.CdnDisplayName()` — encoded URLs and UUIDs become `image.ext`, long names truncated
|
|
|
+- Link preview embeds (no description/fields/footer) are skipped when the URL is already in message content
|
|
|
- Currently handled: Discord CDN (filename), Tenor (GIF), Substack (author), YouTube, X/Twitter, Reddit (subreddit), GitHub (owner/repo)
|
|
|
- Fallback: `host + truncated path` (max 48 chars)
|
|
|
|