codeep 1.0.11 → 1.0.12

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.
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useMemo, useEffect } from 'react';
3
3
  import { Text, Box, useInput } from 'ink';
4
4
  import TextInput from 'ink-text-input';
5
+ import clipboard from 'clipboardy';
5
6
  const COMMANDS = [
6
7
  { cmd: '/help', desc: 'Show help' },
7
8
  { cmd: '/status', desc: 'Show status' },
@@ -55,9 +56,24 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
55
56
  setIsSelectingCommand(false);
56
57
  }
57
58
  }, [suggestions.length]);
58
- // Handle keyboard navigation for command suggestions
59
- useInput((input, key) => {
60
- if (disabled || suggestions.length === 0)
59
+ // Handle keyboard navigation for command suggestions and paste
60
+ useInput(async (input, key) => {
61
+ if (disabled)
62
+ return;
63
+ // Handle paste (Ctrl+V) - read from clipboard and insert
64
+ if (key.ctrl && input === 'v') {
65
+ try {
66
+ const clipboardText = await clipboard.read();
67
+ // Replace newlines with spaces to prevent multi-line issues
68
+ const sanitized = clipboardText.replace(/\r?\n/g, ' ').trim();
69
+ setValue(prev => prev + sanitized);
70
+ }
71
+ catch (error) {
72
+ // Clipboard read failed, ignore
73
+ }
74
+ return;
75
+ }
76
+ if (suggestions.length === 0)
61
77
  return;
62
78
  // Navigate suggestions with up/down arrows
63
79
  if (key.upArrow) {
@@ -74,7 +90,7 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
74
90
  setIsSelectingCommand(false);
75
91
  return;
76
92
  }
77
- }, { isActive: isSelectingCommand });
93
+ }, { isActive: !disabled });
78
94
  const handleChange = (newValue) => {
79
95
  setValue(newValue);
80
96
  };
@@ -509,7 +509,7 @@ export async function runAgent(prompt, projectContext, options = {}) {
509
509
  messages.push({ role: 'assistant', content: finalResponse });
510
510
  messages.push({
511
511
  role: 'user',
512
- content: `Excellent! Task ${prevTask?.id} is complete.\n\nProgress so far:\n${progressSummary}\n\nNow continue with:\n${nextTask.id}. ${nextTask.description}\n\nOriginal request: ${taskPlan.originalPrompt}`
512
+ content: `Good! Task ${prevTask?.id} done.\n\nCompleted:\n${progressSummary}\n\nNEXT TASK (do it now):\n${nextTask.id}. ${nextTask.description}\n\nUse your tools immediately to complete this task. Do NOT ask for permission or confirmation.`
513
513
  });
514
514
  finalResponse = ''; // Reset for next task
515
515
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
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",