codeep 1.2.16 → 1.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -448,8 +448,15 @@ export class LineEditor {
448
448
  }
449
449
  break;
450
450
  default:
451
+ // Alt+b / Alt+f — word jump (macOS Option+Left/Right)
452
+ if (event.alt && event.key === 'b') {
453
+ this.wordLeft();
454
+ }
455
+ else if (event.alt && event.key === 'f') {
456
+ this.wordRight();
457
+ }
451
458
  // Regular character (single char, not control)
452
- if (event.key.length === 1 && !event.ctrl && !event.alt) {
459
+ else if (event.key.length === 1 && !event.ctrl && !event.alt) {
453
460
  this.value = this.value.slice(0, this.cursorPos) + event.key + this.value.slice(this.cursorPos);
454
461
  this.cursorPos++;
455
462
  }
@@ -273,6 +273,22 @@ export declare const AGENT_TOOLS: {
273
273
  };
274
274
  };
275
275
  };
276
+ minimax_understand_image: {
277
+ name: string;
278
+ description: string;
279
+ parameters: {
280
+ prompt: {
281
+ type: string;
282
+ description: string;
283
+ required: boolean;
284
+ };
285
+ image_url: {
286
+ type: string;
287
+ description: string;
288
+ required: boolean;
289
+ };
290
+ };
291
+ };
276
292
  };
277
293
  export declare function formatToolDefinitions(): string;
278
294
  /**
@@ -19,7 +19,7 @@ const ZAI_MCP_TOOLS = ['web_search', 'web_read', 'github_read'];
19
19
  // Z.AI provider IDs that have MCP endpoints
20
20
  const ZAI_PROVIDER_IDS = ['z.ai', 'z.ai-cn'];
21
21
  // MiniMax MCP tool names (available when user has any MiniMax API key)
22
- const MINIMAX_MCP_TOOLS = ['minimax_web_search'];
22
+ const MINIMAX_MCP_TOOLS = ['minimax_web_search', 'minimax_understand_image'];
23
23
  // MiniMax provider IDs
24
24
  const MINIMAX_PROVIDER_IDS = ['minimax', 'minimax-cn'];
25
25
  /**
@@ -278,6 +278,14 @@ export const AGENT_TOOLS = {
278
278
  query: { type: 'string', description: 'Search query', required: true },
279
279
  },
280
280
  },
281
+ minimax_understand_image: {
282
+ name: 'minimax_understand_image',
283
+ description: 'Analyze and understand an image using MiniMax vision model. Can describe images, read text from screenshots, understand diagrams, and answer questions about visual content. Requires a MiniMax API key.',
284
+ parameters: {
285
+ prompt: { type: 'string', description: 'Question or instruction about the image (e.g. "Describe this image", "What text is in this screenshot?")', required: true },
286
+ image_url: { type: 'string', description: 'URL of the image or base64-encoded image data', required: true },
287
+ },
288
+ },
281
289
  };
282
290
  /**
283
291
  * Format tool definitions for system prompt (text-based fallback)
@@ -1198,6 +1206,23 @@ export async function executeTool(toolCall, projectRoot) {
1198
1206
  const output = result.length > 15000 ? result.substring(0, 15000) + '\n\n... (truncated)' : result;
1199
1207
  return { success: true, output, tool, parameters };
1200
1208
  }
1209
+ case 'minimax_understand_image': {
1210
+ const mmConfig = getMinimaxMcpConfig();
1211
+ if (!mmConfig) {
1212
+ return { success: false, output: '', error: 'minimax_understand_image requires a MiniMax API key. Configure one via /provider minimax', tool, parameters };
1213
+ }
1214
+ const prompt = parameters.prompt;
1215
+ const imageUrl = parameters.image_url;
1216
+ if (!prompt) {
1217
+ return { success: false, output: '', error: 'Missing required parameter: prompt', tool, parameters };
1218
+ }
1219
+ if (!imageUrl) {
1220
+ return { success: false, output: '', error: 'Missing required parameter: image_url', tool, parameters };
1221
+ }
1222
+ const result = await callMinimaxApi(mmConfig.host, '/v1/coding_plan/vlm', { prompt, image_url: imageUrl }, mmConfig.apiKey);
1223
+ const output = result.length > 15000 ? result.substring(0, 15000) + '\n\n... (truncated)' : result;
1224
+ return { success: true, output, tool, parameters };
1225
+ }
1201
1226
  default:
1202
1227
  return { success: false, output: '', error: `Unknown tool: ${tool}`, tool, parameters };
1203
1228
  }
@@ -1317,6 +1342,7 @@ export function createActionLog(toolCall, result) {
1317
1342
  web_read: 'fetch',
1318
1343
  github_read: 'fetch',
1319
1344
  minimax_web_search: 'fetch',
1345
+ minimax_understand_image: 'fetch',
1320
1346
  };
1321
1347
  const target = toolCall.parameters.path ||
1322
1348
  toolCall.parameters.command ||
@@ -4,7 +4,7 @@ import { getOpenAITools, getAnthropicTools, parseToolCalls, parseOpenAIToolCalls
4
4
  const ALL_TOOL_NAMES = Object.keys(AGENT_TOOLS);
5
5
  // MCP tools are filtered out when no API key is configured (e.g. in tests)
6
6
  const ZAI_MCP_TOOLS = ['web_search', 'web_read', 'github_read'];
7
- const MINIMAX_MCP_TOOLS = ['minimax_web_search'];
7
+ const MINIMAX_MCP_TOOLS = ['minimax_web_search', 'minimax_understand_image'];
8
8
  const MCP_TOOLS = [...ZAI_MCP_TOOLS, ...MINIMAX_MCP_TOOLS];
9
9
  const CORE_TOOL_NAMES = ALL_TOOL_NAMES.filter(n => !MCP_TOOLS.includes(n));
10
10
  // ─── getOpenAITools ──────────────────────────────────────────────────────────
@@ -585,6 +585,11 @@ describe('createActionLog', () => {
585
585
  const log = createActionLog(tc, makeResult({ tool: 'minimax_web_search' }));
586
586
  expect(log.type).toBe('fetch');
587
587
  });
588
+ it('should map minimax_understand_image to type "fetch"', () => {
589
+ const tc = { tool: 'minimax_understand_image', parameters: { prompt: 'describe', image_url: 'https://example.com/img.png' } };
590
+ const log = createActionLog(tc, makeResult({ tool: 'minimax_understand_image' }));
591
+ expect(log.type).toBe('fetch');
592
+ });
588
593
  it('should default to type "command" for unknown tools', () => {
589
594
  const tc = { tool: 'unknown_tool', parameters: {} };
590
595
  const log = createActionLog(tc, makeResult({ tool: 'unknown_tool' }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.2.16",
3
+ "version": "1.2.17",
4
4
  "description": "AI-powered coding assistant built for the terminal. Multiple LLM providers, project-aware context, and a seamless development workflow.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",