Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "code-mode",
"version": "0.12.15",
"version": "0.12.16",
"description": "Code mode for MCP: the model writes one JavaScript program that calls MCP tools in a sandbox, instead of one tool call per step.",
"types": "./types/index.d.ts",
"author": {
Expand Down
10 changes: 5 additions & 5 deletions hooks/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ async function approveRemoval($: EngineInterface, hint: Hint, edit: HintEdit, pr
// Approve: merge the proposal's bullets into the active file beside pending/
// (or move the whole file when there is none yet), then remove the proposal.
// A bullet the file has already is not added again (see appendItems).
// `proposal` is the text the card showed (see shownText).
// `proposal` is the text the card showed (see cardText).
async function approvePending(
$: EngineInterface,
path: string,
Expand Down Expand Up @@ -765,7 +765,7 @@ async function decideOnce(
// The proposal text that a card showed, when its file still has it. Approve
// and Discard act on this text and fail when the file changed after the card
// drew it, so the person decides on the text they read (as decideUnapproved).
async function shownText($: EngineInterface, path: string, shown: string): Promise<string> {
async function cardText($: EngineInterface, path: string, shown: string): Promise<string> {
if ((await readIfExists($, path)) !== shown)
throw new Error(`${path} changed after the card showed it; review it again`)
return shown
Expand All @@ -779,7 +779,7 @@ function decidePending(
projectHints: boolean,
): Promise<Decision | undefined> {
return decideOnce($, path, async () => {
const proposal = await shownText($, path, shown)
const proposal = await cardText($, path, shown)
const hint = parseHint(proposal, path, 'user')
const dest =
action === 'approved'
Expand Down Expand Up @@ -1090,7 +1090,7 @@ async function loadFunctionProposals($: EngineInterface): Promise<SavedFunction[

// Approve: the proposal becomes functions/<name>.md, without its reason, and
// replaces a function with that name. An Approve that cannot write it fails
// and keeps the proposal. `text` is the text the card showed (see shownText).
// and keeps the proposal. `text` is the text the card showed (see cardText).
async function saveFunction($: EngineInterface, path: string, text: string): Promise<string> {
const proposal = parseFunction(text, path)
const dir = await functionsDir($)
Expand All @@ -1113,7 +1113,7 @@ function decideFunction(
action: Action,
): Promise<Decision | undefined> {
return decideOnce($, path, async () => {
const text = await shownText($, path, shown)
const text = await cardText($, path, shown)
const dest = action === 'approved' ? await saveFunction($, path, text) : undefined
await $.process.run(['rm', '-f', path])
return { action, dest, kind: 'function' }
Expand Down
Loading