Skip to content

674019130/yaak-plugin-SSE-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSE Response Parser

A Yaak plugin that parses Server-Sent Events (SSE) streaming responses from LLM APIs into readable text, with metadata extraction and custom rule support.

Supported Providers

  • Claude (Anthropic) - content_block_delta / text_delta
  • ChatGPT (OpenAI) - chat.completion.chunk / choices[0].delta.content
  • Gemini (Google) - candidates[0].content.parts[0].text
  • Custom - any SSE format via user-defined JSON path rules

Usage

Response Filter

Type one of the following in the response filter box:

Input Description
auto Auto-detect provider format
claude Parse Anthropic streaming response
chatgpt Parse OpenAI streaming response
gemini Parse Google Gemini streaming response
choices[0].delta.content Custom JSON path per SSE event

Right-Click Actions

Right-click on any HTTP request to access:

Action Description
SSE > Parse (Auto Detect) Auto-detect provider and parse response
SSE > Parse (Select Provider) Choose from built-in providers + custom rules
SSE > Add Custom Rule Add a named JSON path rule (persisted)
SSE > Delete Custom Rule Remove a saved custom rule
Strip > Clean Clipboard Remove all whitespace from clipboard content

Parse Result Dialog

After parsing, a dialog shows:

  • Model and provider name
  • Token usage (input / output)
  • Text stats (chars, words, lines)
  • Search queries (Claude web search)
  • Event type distribution (collapsible)
  • Thinking content (Claude extended thinking, collapsible)
  • Parsed content with "Copy Content" button

Custom Rules

Custom rules let you save reusable JSON path expressions with a friendly name. They persist across sessions via Yaak's built-in store.

  1. Right-click a request > SSE > Add Custom Rule
  2. Enter a name (e.g., "My API") and a JSON path (e.g., data.text)
  3. The rule appears in SSE > Parse (Select Provider) dropdown alongside built-in providers

JSON path supports dot notation, bracket indices, and optional $. prefix:

  • choices[0].delta.content
  • $.candidates[0].content.parts[0].text
  • data.text

Clean Clipboard

Strip > Clean Clipboard reads your clipboard, removes all whitespace (spaces, newlines, tabs), and writes the cleaned text back. Useful for pasting API keys, tokens, or JSON values that contain unwanted whitespace.

Cross-platform support: macOS (pbpaste), Windows (powershell Get-Clipboard), Linux (xclip / xsel).

Installation

Install from the Yaak Plugin Directory, or for local development:

git clone https://github.com/674019130/yaak-plugin-SSE-parser.git
cd yaak-plugin-SSE-parser
npm install
npm run dev

Changelog

0.1.2

  • Added Strip > Clean Clipboard action — one-click whitespace removal from clipboard content (cross-platform)

0.1.1

  • Added custom rule management (add / delete named JSON path rules)
  • Improved parse result dialog with metadata, token usage, thinking content

0.1.0

  • Initial release with SSE parsing for Claude, ChatGPT, Gemini
  • Response filter and auto-detect provider
  • Parse result dialog with copy-to-clipboard

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors