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
19 changes: 19 additions & 0 deletions ai/chatgpt/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## [1.2.4] - 2026-11-10

### Added

- Answer Diff: local line-by-line comparisons, an explicitly saved baseline, copy/download and a guided tutorial.
- Quota recovery cards with +1, +5, full recovery, adjustable horizon and local scenario times when evidence is sufficient.

### Fixed

- Wrapped code retains enabled line numbers and measures each logical line's rendered height.
- Long code blocks automatically fold according to the configured threshold.
- Code-block resize observers are released when enhanced blocks are removed.
- Original inline display styles are restored when code enhancement is disabled.

### Documentation

- Added Answer Diff privacy, persistence, comparison limits and tutorial documentation.
- Updated code wrapping, folding and quota-card instructions.

## [1.2.2] - 2026-11-10

### Changed
Expand Down
4 changes: 4 additions & 0 deletions ai/chatgpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,7 @@ PDF export opens a print-ready preview with a contents list, readable sections,
## Usage Quota V2

The header usage dialog combines reported allowances, capacity evidence and observation-based recovery scenarios. See [Usage Quota V2](docs/usage-quota-v2.md).

## Answer Diff

Compare two answers or code revisions locally, inspect exact text changes, and explicitly save a reusable baseline. Nothing is sent automatically. See [Answer diff](docs/answer-diff.md).
49 changes: 49 additions & 0 deletions ai/chatgpt/docs/answer-diff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Answer diff
description: Compare exact changes between answers or code revisions.
section: Guides
order: 46
---

# Answer diff

Answer Diff compares two pieces of text locally. It does not send messages, call an AI service or judge which answer is correct.

## Compare revisions

1. Select an answer before opening Answer diff, or copy the answer yourself.
2. Open the Answer diff composer tool.
3. Put the original text in Baseline and the revision in Revision.
4. Click Compare.
5. Inspect added, removed and unchanged lines.
6. Copy or download the comparison if useful.

Blank lines and indentation participate in the comparison. Line endings are normalized.

## Reuse a baseline

Save baseline explicitly stores the left editor's text, source URL and save time.

Return from another conversation, paste the revised answer and compare it against that baseline. You can also paste text from the other platform manually.

Each installed userscript has its own storage; there is no automatic synchronization.

Replacing or deleting the saved baseline asks for confirmation. Deleting the saved baseline does not erase text already in the open editors.

## Privacy

Editor text is not saved automatically. Only Save baseline persists content.

Explicitly saved temporary-chat content persists locally. Do not save secrets or sensitive information. Stored source URLs omit query parameters and fragments, but may contain conversation identifiers.

## Limits

Each editor accepts up to 100,000 characters.

The exact line comparison uses a bounded longest-common-subsequence matrix. If the changed region is too large, it is shown as a coarse removal/addition block, clearly labelled.

The downloaded comparison is a readable report, not a patch intended for automatic application.

## Tutorial

Open Help and choose Answer diff.
10 changes: 8 additions & 2 deletions ai/chatgpt/docs/code-blocks-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ The feature does not alter ChatGPT's editable Run-code editors.
## Reading

- Wrap toggles visual wrapping without changing the source.
- Line numbers appear when wrapping is off.
- Fold is available for sufficiently long blocks, but code starts expanded.
- Line numbers remain available with wrapping and align with logical source lines.
- Long blocks automatically fold at the configured threshold. Expand code reveals the full block; a threshold of zero disables automatic folding.
- Download saves the original source text.

Syntax highlighting is retained only when its reconstructed text matches the source. Otherwise the block falls back to plain text rather than corrupting code.
Expand All @@ -39,3 +39,9 @@ Copy a selection containing blank lines, tabs and nested indentation into a plai
Code panels follow the site's explicit light/dark theme, with a GitHub-like syntax palette. Language badges retain their language-associated colors. Badges are typographic representations, not official logo artwork.

Additional filename labels and conservative content signatures improve detection. New language labels may use an approximate syntax palette or plain text; the original source remains authoritative.

## Wrapping and folding in 1.2.4

Wrapping and line numbers are independent toggles. A wrapped logical line keeps one source line number. The gutter is remeasured when the code viewport resizes.

Long blocks automatically fold according to the configured threshold. A threshold of zero disables this behavior. Copy and download still use the complete source.
6 changes: 6 additions & 0 deletions ai/chatgpt/docs/usage-quota-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ Perplexity reports are requested using its current account/tier namespace. ChatG
## Tutorial

Open Help and choose Usage Quota V2. There is no separate Quota Insights module to enable.

## Recovery cards

The dialog displays +1, +5 and full-recovery cards. When evidence supports a scenario, each card shows a relative duration and an estimated local clock time. These are conditional rate scenarios, not guaranteed server refill deadlines.

Change the recovery horizon to inspect projected recovery within a selected number of minutes. Expand the evidence section for observations, sampled duration and net counter changes.
2 changes: 1 addition & 1 deletion ai/chatgpt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nolly/ai-chatgpt",
"version": "1.2.2",
"version": "1.2.4",
"private": true,
"type": "module",
"license": "PolyForm-Strict-1.0.0",
Expand Down
14 changes: 8 additions & 6 deletions ai/chatgpt/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
UpdatesFeature,
configurePlatform,
configureUi,
AnswerDiffFeature,
} from '@nolly/ai'
import { App } from './app'
import { fileBudget } from './budget'
Expand Down Expand Up @@ -79,19 +80,20 @@ whenReady(() => {
.register((context) => new PromptLibraryFeature(context))
.register((context) => new SelectionToolbarFeature(context))
.register((context) => new MaxWidthFeature(context, { storage, sidebar: { rule: { id: 'left-sidebar', selector: 'aside' }, label: 'Left Sidebar', defaultRemoved: false } }))
.register((context) => new CodeBlocksFeature(context))
.register((context) => new UsageFeature(context))
.register((context) => new DiagnosticsFeature(context))
.register((context) => new EnterAsNewlineFeature(context))
.register((context) => new CodeBlocksFeature(context))
.register((context) => new MessageSplitterFeature(context))
.register((context) => new BatchRunnerFeature(context))
.register((context) => new DraftGuardFeature(context))
.register((context) => new CommandPaletteFeature(context))
.register((context) => new ExporterFeature(context))
.register((context) => new TutorialFeature(context))
.register((context) => new UpdatesFeature(context))
.register((context) => new PromptQueueFeature(context))
.register((context) => new RecallFeature(context))
.register((context) => new ContextPacksFeature(context))
.register((context) => new ExporterFeature(context))
.register((context) => new UpdatesFeature(context))
.register((context) => new UsageFeature(context))
.register((context) => new TutorialFeature(context))
.register((context) => new DiagnosticsFeature(context))
.register((context) => new AnswerDiffFeature(context))
.start()
})
8 changes: 4 additions & 4 deletions ai/chatgpt/src/tours.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createPdfTour, createQuotaTour } from '@nolly/ai'
import { createAnswerDiffTour, createPdfTour, createQuotaTour } from '@nolly/ai'
import { contextPacksTour, loadPromptShortcut, loadShortcut, tour } from '@nolly/ai'
import type { Tour } from '@nolly/ai'
import { composerKit } from './kit'
Expand Down Expand Up @@ -99,8 +99,8 @@ const codeBlocks: Tour = {
find('.bp-code-v2 .bp-code-actions')
),
info(
'Themes and language detection',
'Code panels follow the site light/dark theme. Language-colored badges remain colored. Filename labels and conservative signatures identify more languages; highlighting remains approximate and never changes the source text.'
'Wrapping and folding',
'Line numbers remain visible while wrapping and align with logical source lines. Long blocks automatically fold at the configured threshold. Expand code or use the fold button to reveal them. Setting the threshold to zero disables automatic folding.'
)
]
}
Expand Down Expand Up @@ -146,4 +146,4 @@ const contextPacks: Tour = {
}
}

export const TOURS: readonly Tour[] = [gettingStarted, usage, longMessages, prompts, batch, codeBlocks, exporting, selection, palette, contextPacks, createPdfTour(), createQuotaTour()]
export const TOURS: readonly Tour[] = [gettingStarted, usage, longMessages, prompts, batch, codeBlocks, exporting, selection, palette, contextPacks, createPdfTour(), createQuotaTour(), createAnswerDiffTour()]
19 changes: 19 additions & 0 deletions ai/perplexity/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

All notable changes to Better Perplexity are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses [Semantic Versioning](https://semver.org/).

## [1.2.4] - 2026-11-10

### Added

- Answer Diff: local line-by-line comparisons, an explicitly saved baseline, copy/download and a guided tutorial.
- Quota recovery cards with +1, +5, full recovery, adjustable horizon and local scenario times when evidence is sufficient.

### Fixed

- Wrapped code retains enabled line numbers and measures each logical line's rendered height.
- Long code blocks automatically fold according to the configured threshold.
- Code-block resize observers are released when enhanced blocks are removed.
- Original inline display styles are restored when code enhancement is disabled.

### Documentation

- Added Answer Diff privacy, persistence, comparison limits and tutorial documentation.
- Updated code wrapping, folding and quota-card instructions.

## [1.2.2] - 2026-11-10

### Changed
Expand Down
4 changes: 4 additions & 0 deletions ai/perplexity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,7 @@ PDF export opens a print-ready preview with a contents list, readable sections,
## Usage Quota V2

The header usage dialog combines reported allowances, capacity evidence and observation-based recovery scenarios. See [Usage Quota V2](docs/usage-quota-v2.md).

## Answer Diff

Compare two answers or code revisions locally, inspect exact text changes, and explicitly save a reusable baseline. Nothing is sent automatically. See [Answer diff](docs/answer-diff.md).
49 changes: 49 additions & 0 deletions ai/perplexity/docs/answer-diff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Answer diff
description: Compare exact changes between answers or code revisions.
section: Guides
order: 46
---

# Answer diff

Answer Diff compares two pieces of text locally. It does not send messages, call an AI service or judge which answer is correct.

## Compare revisions

1. Select an answer before opening Answer diff, or copy the answer yourself.
2. Open the Answer diff composer tool.
3. Put the original text in Baseline and the revision in Revision.
4. Click Compare.
5. Inspect added, removed and unchanged lines.
6. Copy or download the comparison if useful.

Blank lines and indentation participate in the comparison. Line endings are normalized.

## Reuse a baseline

Save baseline explicitly stores the left editor's text, source URL and save time.

Return from another conversation, paste the revised answer and compare it against that baseline. You can also paste text from the other platform manually.

Each installed userscript has its own storage; there is no automatic synchronization.

Replacing or deleting the saved baseline asks for confirmation. Deleting the saved baseline does not erase text already in the open editors.

## Privacy

Editor text is not saved automatically. Only Save baseline persists content.

Explicitly saved temporary-chat content persists locally. Do not save secrets or sensitive information. Stored source URLs omit query parameters and fragments, but may contain conversation identifiers.

## Limits

Each editor accepts up to 100,000 characters.

The exact line comparison uses a bounded longest-common-subsequence matrix. If the changed region is too large, it is shown as a coarse removal/addition block, clearly labelled.

The downloaded comparison is a readable report, not a patch intended for automatic application.

## Tutorial

Open Help and choose Answer diff.
10 changes: 8 additions & 2 deletions ai/perplexity/docs/code-blocks-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ The feature does not alter ChatGPT's editable Run-code editors.
## Reading

- Wrap toggles visual wrapping without changing the source.
- Line numbers appear when wrapping is off.
- Fold is available for sufficiently long blocks, but code starts expanded.
- Line numbers remain available with wrapping and align with logical source lines.
- Long blocks automatically fold at the configured threshold. Expand code reveals the full block; a threshold of zero disables automatic folding.
- Download saves the original source text.

Syntax highlighting is retained only when its reconstructed text matches the source. Otherwise the block falls back to plain text rather than corrupting code.
Expand All @@ -39,3 +39,9 @@ Copy a selection containing blank lines, tabs and nested indentation into a plai
Code panels follow the site's explicit light/dark theme, with a GitHub-like syntax palette. Language badges retain their language-associated colors. Badges are typographic representations, not official logo artwork.

Additional filename labels and conservative content signatures improve detection. New language labels may use an approximate syntax palette or plain text; the original source remains authoritative.

## Wrapping and folding in 1.2.4

Wrapping and line numbers are independent toggles. A wrapped logical line keeps one source line number. The gutter is remeasured when the code viewport resizes.

Long blocks automatically fold according to the configured threshold. A threshold of zero disables this behavior. Copy and download still use the complete source.
6 changes: 6 additions & 0 deletions ai/perplexity/docs/usage-quota-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ Perplexity reports are requested using its current account/tier namespace. ChatG
## Tutorial

Open Help and choose Usage Quota V2. There is no separate Quota Insights module to enable.

## Recovery cards

The dialog displays +1, +5 and full-recovery cards. When evidence supports a scenario, each card shows a relative duration and an estimated local clock time. These are conditional rate scenarios, not guaranteed server refill deadlines.

Change the recovery horizon to inspect projected recovery within a selected number of minutes. Expand the evidence section for observations, sampled duration and net counter changes.
2 changes: 1 addition & 1 deletion ai/perplexity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nolly/ai-perplexity",
"version": "1.2.2",
"version": "1.2.4",
"private": true,
"type": "module",
"license": "PolyForm-Strict-1.0.0",
Expand Down
2 changes: 2 additions & 0 deletions ai/perplexity/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
UpdatesFeature,
configurePlatform,
configureUi,
AnswerDiffFeature,
} from '@nolly/ai'
import { App } from './core/app'
import { composerKit } from './core/composer'
Expand Down Expand Up @@ -75,4 +76,5 @@ new App()
.register((context) => new PromptQueueFeature(context))
.register((context) => new RecallFeature(context))
.register((context) => new ContextPacksFeature(context))
.register((context) => new AnswerDiffFeature(context))
.start()
8 changes: 4 additions & 4 deletions ai/perplexity/src/tours.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createPdfTour, createQuotaTour } from '@nolly/ai'
import { createAnswerDiffTour, createPdfTour, createQuotaTour } from '@nolly/ai'
import { findComposer } from './core/composer'
import { contextPacksTour, loadPromptShortcut, loadShortcut, tour, type Tour } from '@nolly/ai'

Expand Down Expand Up @@ -92,8 +92,8 @@ const codeBlocks: Tour = {
find('.bp-code-v2 .bp-code-actions')
),
info(
'Themes and language detection',
'Code panels follow the site light/dark theme. Language-colored badges remain colored. Filename labels and conservative signatures identify more languages; highlighting remains approximate and never changes the source text.'
'Wrapping and folding',
'Line numbers remain visible while wrapping and align with logical source lines. Long blocks automatically fold at the configured threshold. Expand code or use the fold button to reveal them. Setting the threshold to zero disables automatic folding.'
)
]
}
Expand Down Expand Up @@ -140,4 +140,4 @@ const contextPacks: Tour = {
}
}

export const TOURS: readonly Tour[] = [gettingStarted, longMessages, prompts, batch, codeBlocks, exporting, selection, palette, contextPacks, createPdfTour(), createQuotaTour()]
export const TOURS: readonly Tour[] = [gettingStarted, longMessages, prompts, batch, codeBlocks, exporting, selection, palette, contextPacks, createPdfTour(), createQuotaTour(), createAnswerDiffTour()]
6 changes: 3 additions & 3 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions core/ai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Changelog
# Changelog

## [0.2.3] - 2026-11-10

### Code wrapping and Answer Diff update

- Added measured wrapped-line gutters and restored threshold-based automatic folding.
- Rebuilt quota reporting as recovery cards with evidence details.
- Added the bounded local Answer Diff engine, feature and tutorial.

## [0.2.2] - 2026-11-10

- Integrated the quota-ledger panel and summaries into platform usage features.
Expand Down
2 changes: 1 addition & 1 deletion core/ai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nolly/ai",
"version": "0.2.2",
"version": "0.2.3",
"private": true,
"type": "module",
"license": "PolyForm-Strict-1.0.0",
Expand Down
Loading
Loading