add macros (#68)

This commit is contained in:
David Blass
2026-01-14 22:52:54 +00:00
committed by pullfrog[bot]
parent 3539ddf943
commit 1daf1571cf
20 changed files with 376 additions and 269 deletions
+3 -3
View File
@@ -6,10 +6,10 @@ import { addInstructions } from "./instructions.ts";
import { agent, createAgentEnv, installFromNpmTarball } from "./shared.ts";
// Model selection based on effort level
// Note: nothink uses Haiku for speed, think uses Sonnet for balance, max uses Opus for capability
// Note: mini uses Haiku for speed, auto uses opusplan for balance, max uses Opus for capability
const claudeEffortModels: Record<Effort, string> = {
nothink: "haiku",
think: "opusplan",
mini: "haiku",
auto: "opusplan",
max: "opus",
};
+6 -4
View File
@@ -15,16 +15,18 @@ import { agent, installFromNpmTarball, setupProcessAgentEnv } from "./shared.ts"
// model configuration based on effort level
const codexModel: Record<Effort, string> = {
nothink: "gpt-5.1-codex-mini",
think: "gpt-5.1-codex",
mini: "gpt-5.1-codex-mini",
// https://developers.openai.com/codex/models/
// gpt-5.2-codex is not yet available via api key (even through codex cli)
auto: "gpt-5.1-codex",
max: "gpt-5.1-codex-max",
} as const;
// reasoning effort configuration based on effort level
// uses modelReasoningEffort parameter from ThreadOptions
const codexReasoningEffort: Record<Effort, ModelReasoningEffort | undefined> = {
nothink: "low",
think: undefined, // use default
mini: "low",
auto: undefined, // use default
max: "high",
};
+3 -3
View File
@@ -13,10 +13,10 @@ import {
} from "./shared.ts";
// effort configuration for Cursor
// only "max" overrides the model; nothink/think use default ("auto")
// only "max" overrides the model; mini/auto use default ("auto")
const cursorEffortModels: Record<Effort, string | null> = {
nothink: null, // use default (auto)
think: null, // use default (auto)
mini: null, // use default (auto)
auto: null, // use default (auto)
max: "opus-4.5-thinking",
} as const;
+8 -3
View File
@@ -15,10 +15,15 @@ import {
// effort configuration: model + thinking level
// thinkingLevel is set via settings.json modelConfig.generateContentConfig.thinkingConfig
// see: https://ai.google.dev/gemini-api/docs/thinking#thinking-levels
// latest models:
const geminiEffortConfig: Record<Effort, { model: string; thinkingLevel: string }> = {
nothink: { model: "gemini-2.5-flash", thinkingLevel: "LOW" },
think: { model: "gemini-2.5-flash", thinkingLevel: "HIGH" },
max: { model: "gemini-2.5-pro", thinkingLevel: "HIGH" },
// https://ai.google.dev/gemini-api/docs/models
// the docs mention needing to enable preview features for these models but if you
// pass the model directly it works if we ever did need to do something like this,
// we could write to .gemini/settings.json
mini: { model: "gemini-3-flash-preview", thinkingLevel: "LOW" },
auto: { model: "gemini-3-flash-preview", thinkingLevel: "HIGH" },
max: { model: "gemini-3-pro-preview", thinkingLevel: "HIGH" },
} as const;
// gemini cli event types inferred from stream-json output (NDJSON format)