Skip to content

Instantly share code, notes, and snippets.

@aliou
aliou / _readme.md
Last active July 13, 2026 13:09
Pi RPC extension UI file-transfer demo

Pi RPC client-to-tool file transfer

This gist contains both the supported current-Pi approach and a custom raw-process approach.

Example Status Files
Supported dialog bridge Works with current Pi client.mjs, server.ts
Custom raw-process bridge Works with Pi versions before 0.62.0 custom-client.mjs, custom-server.ts

Both examples keep the file on the client device until the client chooses to send it. The Pi extension receives a response and returns a normal tool result.

@aliou
aliou / SKILL.md
Created June 28, 2026 10:12 — forked from fofr/SKILL.md
An agent skill for writing in the GOV.UK style
name govuk-style
description Write and edit in GOV.UK / GDS house style — plain English, active voice, front-loaded content, sentence case, and no bold or italics for emphasis. Use when writing or editing reports, research write-ups, guidance, documentation, summaries, or any prose where clarity and accessibility matter.
user-invokable true
args
name description required
target
The document or text to write or rewrite in GOV.UK style (optional)
false
@aliou
aliou / synthetic-provider.gist.ts
Created May 23, 2026 14:03
Custom providers in Pi: Synthetic provider extension
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
// [!code fold:start] thinking level map
const THINKING_LEVEL_MAP = {
minimal: "low",
low: "low",
medium: "medium",
high: "high",
xhigh: "high",
} as const;
@aliou
aliou / synthetic-models.gist.json
Created May 23, 2026 14:03
Custom providers in Pi: Synthetic models.json
{
"providers": {
"synthetic": {
"baseUrl": "https://api.synthetic.new/openai/v1",
"apiKey": "SYNTHETIC_API_KEY",
"api": "openai-completions",
"compat": {
"supportsDeveloperRole": false,
"supportsReasoningEffort": true
},
@aliou
aliou / _readme.md
Created May 11, 2026 19:35
`pi -e https://gist.github.com/aliou/17322b3fa9e816e2231fd4be05005398` — Pi extension for LLM-style shebang prompt scripts
@aliou
aliou / session.html
Created April 30, 2026 18:06
Fix bug in package manager and config selector
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Session Export</title>
<style>
:root {
--accent: #4a5e81;
--border: #606060;
@aliou
aliou / session.html
Created April 30, 2026 18:06
Investigate headers display issue
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Session Export</title>
<style>
:root {
--accent: #4a5e81;
--border: #606060;
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
export default function tpsEditorWidget(pi: ExtensionAPI) {
pi.on("session_start", (_event, ctx) => {
if (!ctx.hasUI) return;
pi.events.on("tps:telemetry", (data) => {
const t = data as {
tps: number | null;
tokens: { input: number; output: number };
@aliou
aliou / session.html
Created April 27, 2026 13:27
Pi session export
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Session Export</title>
<style>
:root {
--accent: #7a8aa6;
--border: #404040;
@aliou
aliou / session.html
Created April 27, 2026 13:27
Pi session export
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Session Export</title>
<style>
:root {
--accent: #7a8aa6;
--border: #404040;