refactor: rename the PIKA leftovers to AIRSHIP
The injected config global, the deprecated system-prompt export and the agent-stderr debug switch all still carried an older product name that nothing in the repo explains. Writer and reader of the config global ship in the same response, so both flip together with no compat window: - window.__PIKA__ -> window.__AIRSHIP__ (proxy + shell writers, overlay readers, one prose comment) - PIKA_SYSTEM_PROMPT -> AIRSHIP_SYSTEM_PROMPT (still deprecated) - PIKA_DEBUG -> AIRSHIP_AGENT_DEBUG, now documented in the README; kept separate from AIRSHIP_DEBUG, which would otherwise start streaming raw agent stderr under --debug Breaking: anyone exporting PIKA_DEBUG loses agent stderr until they rename it; PIKA_SYSTEM_PROMPT importers must switch spellings.
This commit is contained in:
@@ -406,8 +406,10 @@ AIRSHIP_DEBUG AIRSHIP_QUIET AIRSHIP_CLAUDE_MODEL
|
||||
CLI unable to run anything. Booleans take `1`/`true`/`yes`/`on` or `0`/`false`/`no`/`off`;
|
||||
anything else is an error rather than a guess.
|
||||
|
||||
Three more are honoured: `AIRSHIP_EDITOR` (`vscode`, `cursor`, `windsurf` or `zed` — which
|
||||
editor "open in editor" prefers, otherwise probed in that order), and `NO_COLOR` / `FORCE_COLOR`.
|
||||
Four more are honoured: `AIRSHIP_EDITOR` (`vscode`, `cursor`, `windsurf` or `zed` — which
|
||||
editor "open in editor" prefers, otherwise probed in that order), `AIRSHIP_AGENT_DEBUG` (stream
|
||||
the Claude backend's raw stderr to the terminal — separate from `--debug`, which logs airship
|
||||
itself), and `NO_COLOR` / `FORCE_COLOR`.
|
||||
|
||||
### `--cwd`
|
||||
|
||||
|
||||
+4
-2
@@ -408,8 +408,10 @@ AIRSHIP_DEBUG AIRSHIP_QUIET AIRSHIP_CLAUDE_MODEL
|
||||
CLI unable to run anything. Booleans take `1`/`true`/`yes`/`on` or `0`/`false`/`no`/`off`;
|
||||
anything else is an error rather than a guess.
|
||||
|
||||
Three more are honoured: `AIRSHIP_EDITOR` (`vscode`, `cursor`, `windsurf` or `zed` — which
|
||||
editor "open in editor" prefers, otherwise probed in that order), and `NO_COLOR` / `FORCE_COLOR`.
|
||||
Four more are honoured: `AIRSHIP_EDITOR` (`vscode`, `cursor`, `windsurf` or `zed` — which
|
||||
editor "open in editor" prefers, otherwise probed in that order), `AIRSHIP_AGENT_DEBUG` (stream
|
||||
the Claude backend's raw stderr to the terminal — separate from `--debug`, which logs airship
|
||||
itself), and `NO_COLOR` / `FORCE_COLOR`.
|
||||
|
||||
### `--cwd`
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export type { ModelProbeOptions } from "./models";
|
||||
export { listAllModels, listModels } from "./models";
|
||||
export { isPathInside, pathKey, toPosixPath } from "./paths";
|
||||
export type { EditPromptInput } from "./prompt";
|
||||
export { buildEditPrompt, PIKA_SYSTEM_PROMPT, systemPrompt } from "./prompt";
|
||||
export { AIRSHIP_SYSTEM_PROMPT, buildEditPrompt, systemPrompt } from "./prompt";
|
||||
export type { CodexConfigValue, CodexSettings } from "./providers/codex";
|
||||
/** Whether opencode can run a model id, so a caller can refuse one it cannot. */
|
||||
export { namesProvider } from "./providers/opencode-events";
|
||||
|
||||
@@ -106,7 +106,7 @@ export function systemPrompt(agent: AgentKind): string {
|
||||
}
|
||||
|
||||
/** @deprecated Prefer {@link systemPrompt}; retained as the Claude spelling. */
|
||||
export const PIKA_SYSTEM_PROMPT = systemPrompt("claude");
|
||||
export const AIRSHIP_SYSTEM_PROMPT = systemPrompt("claude");
|
||||
|
||||
export interface EditPromptInput {
|
||||
/** Direct-manipulation HTML attribute edits, when present. */
|
||||
|
||||
@@ -243,7 +243,7 @@ async function run(ctx: AgentRunContext): Promise<AgentRunOutcome> {
|
||||
persistSession: true,
|
||||
settingSources: ["project"],
|
||||
stderr: (data) => {
|
||||
if (process.env.PIKA_DEBUG) {
|
||||
if (process.env.AIRSHIP_AGENT_DEBUG) {
|
||||
process.stderr.write(data);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -446,8 +446,8 @@ export function boot(): void {
|
||||
return;
|
||||
}
|
||||
injectStyles();
|
||||
const config = (window as unknown as { __PIKA__?: AirshipWindowConfig })
|
||||
.__PIKA__;
|
||||
const config = (window as unknown as { __AIRSHIP__?: AirshipWindowConfig })
|
||||
.__AIRSHIP__;
|
||||
// The whole config, not just `wsPath`: the surface switcher needs to know
|
||||
// which surface it is on and the clean app path to navigate back to, and an
|
||||
// injection old enough to carry neither still boots — it just falls back to
|
||||
|
||||
@@ -17,8 +17,8 @@ import { bootShell } from "./shell-app";
|
||||
* send that header.
|
||||
*/
|
||||
function start(): void {
|
||||
const config = (window as unknown as { __PIKA__?: AirshipWindowConfig })
|
||||
.__PIKA__;
|
||||
const config = (window as unknown as { __AIRSHIP__?: AirshipWindowConfig })
|
||||
.__AIRSHIP__;
|
||||
|
||||
if (config?.mode === "frame" || isFrameName(window.name)) {
|
||||
bootFrameAgent();
|
||||
|
||||
@@ -2186,7 +2186,7 @@ export class DesignPanel {
|
||||
}
|
||||
// Non-rendered elements are not layers. A <script> in the tree is noise at
|
||||
// best — and because a text-only node is named after its content, an
|
||||
// inline script showed up as a row reading `window.__PIKA__={"wsPath"…`.
|
||||
// inline script showed up as a row reading `window.__AIRSHIP__={"wsPath"…`.
|
||||
const kids = Array.from(node.children).filter(
|
||||
(c) => !(isEditorNode(c) || isNonVisual(c))
|
||||
);
|
||||
|
||||
@@ -306,7 +306,7 @@ function injectOverlay(body: string, config: AirshipWindowConfig): string {
|
||||
const hookTag = '<script src="/__airship/hook.js"></script>';
|
||||
const json = escapeForScript(JSON.stringify(config));
|
||||
const snippet =
|
||||
`<script>window.__PIKA__=${json};</script>` +
|
||||
`<script>window.__AIRSHIP__=${json};</script>` +
|
||||
`<script src="/__airship/overlay.js" defer></script>`;
|
||||
|
||||
const withHook = injectHead(body, hookTag);
|
||||
|
||||
@@ -84,7 +84,7 @@ export function shellHtml(config: AirshipWindowConfig): string {
|
||||
/* Painted before the bundle runs so the canvas never flashes white. */
|
||||
html,body{margin:0;padding:0;height:100%;overflow:hidden;background:#141414;}
|
||||
</style>
|
||||
<script>window.__PIKA__=${json};</script>
|
||||
<script>window.__AIRSHIP__=${json};</script>
|
||||
</head>
|
||||
<body>
|
||||
<script src="/__airship/overlay.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user