Skip to content

accessodu/AdaptiveConversationHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdaptiveConversationHelper — PDCS (LM Studio Edition)

Accessible Discussion Assistant is a Chrome Extension (Manifest V3) that helps blind screen-reader users navigate and understand Reddit discussions using a locally running AI model via LM Studio. It implements PDCS (Prompt-Driven Context Scaffolding): the extension treats your current position in a comment thread as an interaction scope and, on demand, generates localized summaries, relation labels, and argument-level overviews for that scope.


How you hear it: bring your own screen reader

This extension does not speak on its own. It has no built-in text-to-speech. Instead, every announcement is written into ARIA live regions, which are read aloud by your own screen reader (VoiceOver, NVDA, or JAWS) using your configured voice, speed, and verbosity.

You must have a screen reader running to hear anything. On macOS, turn on VoiceOver with Cmd + F5 before using the extension. With no screen reader active, the extension still works but produces no sound — this is by design, so it never competes with a second, unfamiliar synthetic voice.


Features

  • Tree-aware navigation of Reddit comment threads using keyboard shortcuts
  • Jump directly to the next disagreement, question, advice, or direct critic of the OP
  • On-demand AI analysis: balanced and literal summaries of a comment; context analysis, direct-replies analysis, and filtered readouts of a subtree; debate, OP-vs-critics, branch-map, and cross-branch topic-link overviews
  • Relation labeling of comments (agree, disagree, elaborate, question, advice, unrelated) with color coding on the page and spoken relation cues during navigation
  • An accessible proxy panel (modal dialog with focus trap) as the primary interface, plus keyboard shortcuts
  • Fully local inference via LM Studio — no discussion content leaves your machine

Under the hood, the nine on-demand analyses are served by six prompt templates in background.js; several modes reuse the context template with a different scope or spoken presentation.


Requirements

  • Google Chrome (or a Chromium-based browser)
  • A screen reader (VoiceOver, NVDA, or JAWS) running
  • LM Studio running locally with the server enabled
  • Model loaded: qwen2-vl-7b-instruct (or any compatible instruction-following model)
  • LM Studio server reachable at http://localhost:1234

The server address and model are set by the BASE and MODEL_ID constants at the top of background.js. The default is http://localhost:1234. If your LM Studio server runs elsewhere, edit BASE and add the matching host to host_permissions in manifest.json (which already lists localhost, 127.0.0.1, and two example LAN addresses).


Installation

  1. Clone or download this repository.
  2. Start LM Studio, load your model, and enable the local server.
  3. Open Chrome and navigate to chrome://extensions/.
  4. Enable Developer mode (top-right toggle).
  5. Click Load unpacked and select the LMStudio/ folder.
  6. Turn on your screen reader, then open a Reddit post.

Usage

Navigate to any Reddit post. The extension automatically builds a comment tree after the page loads (~2.5s delay for Reddit's client-side hydration). The current comment is highlighted with a yellow outline and scrolled into view.

The proxy panel (Cmd + Option + /) is the primary interface: open it, then use Tab / Shift+Tab to move between grouped buttons and Enter or Space to activate one. Focus is trapped inside the panel while it is open, and returns to the page when it closes. A status box at the top always announces your current position.

On every navigation step the extension announces your depth and sibling position (e.g. "Depth 2. Comment 3 of 5."). After you run a context or branch-map analysis, announcements are enriched with the comment's topic summary, its relation label, the composition of the replies below it, and (after a topic-link analysis) any related comments elsewhere in the thread.


Keyboard Shortcuts (Mac)

Panel

Shortcut Action
Cmd + Option + / Open / close the proxy panel
Escape Close the panel

Navigation

Shortcut Action
Cmd + Option + Down Next sibling comment
Cmd + Option + Up Previous sibling / go to parent
Cmd + Option + J Go deeper (first child reply)
Cmd + Option + K Go up to parent
Cmd + Option + G Jump to next disagreement
Cmd + Option + Y Jump to next question
Cmd + Option + A Jump to next advice comment
Cmd + Option + P Jump to next direct critic of the OP
Cmd + Option + X Stop the current announcement

Analysis

Shortcut Action
Cmd + Option + S Summarize current comment (balanced)
Cmd + Option + L Summarize current comment (literal — preserves tone/slang)
Cmd + Option + C Context analysis of the current subtree
Cmd + Option + R Analyze direct replies only
Cmd + Option + N Speak only disagreeing comments from the subtree
Cmd + Option + Q Speak only questions from the subtree
Cmd + Option + B Debate summary (disagreements as points of contention)
Cmd + Option + O OP vs. critics (scoped to the root post)
Cmd + Option + M Branch map (named topic branches)
Cmd + Option + T Topic links (same topic across branches)

Relation Colors

After a context or branch-map analysis, comments are color-coded on the page for sighted collaborators:

Relation Color
agree Green
disagree Red
elaborate Blue
question Yellow
advice Orange
unrelated Gray

Privacy and robustness notes

  • Local by default. All inference runs on your machine through LM Studio; the extension never sends discussion content to an external service.
  • Structured output is sanitized. Model responses are parsed by a tolerant JSON parser that strips markdown fences and normalizes typographic quotes; unparseable responses produce a short spoken retry message rather than raw output.
  • Prompt injection is not fully prevented. The templates instruct the model to treat comment text as content rather than instructions, but instruction-level guards alone do not guarantee safety on a small local model. Treat spoken AI summaries as assistance, not ground truth.

Project Structure

LMStudio/
├── manifest.json       # Extension config (Manifest V3)
├── background.js       # Service worker — prompt templates + LM Studio API calls
├── contentScript.js    # Injected into Reddit — tree navigation, panel, announcements
└── README.md           # This file

Known Limitations

  • Only Reddit is supported; tree extraction depends on Reddit's client-side markup and may need updating if Reddit changes it.
  • Relation-labeling accuracy is bounded by the local model and is uneven across categories; do not rely on labels without verification.
  • The 2.5-second initialization delay is a workaround for Reddit's slow custom-element hydration and may need adjustment on slower machines.
  • Comments shorter than 30 characters are skipped during tree building.
  • Navigation intelligence (topic summary, branch counts, topic links) is only available after running a context, branch-map, or topic-link analysis.

License

See LICENSE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Contributors

Languages