codeep 1.0.12 → 1.0.13

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.
@@ -30,12 +30,14 @@ const COMMANDS = [
30
30
  ];
31
31
  export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }) => {
32
32
  const [value, setValue] = useState('');
33
+ const [displayValue, setDisplayValue] = useState('');
33
34
  const [selectedIndex, setSelectedIndex] = useState(0);
34
35
  const [isSelectingCommand, setIsSelectingCommand] = useState(false);
35
36
  // Clear input when clearTrigger changes
36
37
  useEffect(() => {
37
38
  if (clearTrigger > 0) {
38
39
  setValue('');
40
+ setDisplayValue('');
39
41
  setSelectedIndex(0);
40
42
  setIsSelectingCommand(false);
41
43
  }
@@ -66,7 +68,16 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
66
68
  const clipboardText = await clipboard.read();
67
69
  // Replace newlines with spaces to prevent multi-line issues
68
70
  const sanitized = clipboardText.replace(/\r?\n/g, ' ').trim();
71
+ // Store full text in value (for submission)
69
72
  setValue(prev => prev + sanitized);
73
+ // If text is longer than 100 chars, show "pasted -X" in display
74
+ if (sanitized.length > 100) {
75
+ const hiddenChars = sanitized.length - 100;
76
+ setDisplayValue(prev => prev + sanitized.substring(0, 100) + ` [pasted -${hiddenChars}]`);
77
+ }
78
+ else {
79
+ setDisplayValue(prev => prev + sanitized);
80
+ }
70
81
  }
71
82
  catch (error) {
72
83
  // Clipboard read failed, ignore
@@ -93,13 +104,15 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
93
104
  }, { isActive: !disabled });
94
105
  const handleChange = (newValue) => {
95
106
  setValue(newValue);
107
+ setDisplayValue(newValue);
96
108
  };
97
- const handleSubmit = (text) => {
98
- if (text.trim() && !disabled) {
99
- onSubmit(text.trim());
109
+ const handleSubmit = () => {
110
+ if (value.trim() && !disabled) {
111
+ onSubmit(value.trim());
100
112
  setValue('');
113
+ setDisplayValue('');
101
114
  setIsSelectingCommand(false);
102
115
  }
103
116
  };
104
- return (_jsxs(Box, { flexDirection: "column", children: [suggestions.length > 0 && (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [suggestions.map((s, i) => (_jsxs(Text, { children: [i === selectedIndex ? _jsx(Text, { color: "#f02a30", children: "\u25B8 " }) : ' ', _jsx(Text, { color: i === selectedIndex ? '#f02a30' : undefined, bold: i === selectedIndex, children: s.cmd }), _jsxs(Text, { color: i === selectedIndex ? undefined : 'gray', children: [" - ", s.desc] })] }, s.cmd))), _jsxs(Text, { color: "gray", children: ["\u2191\u2193 Navigate \u2022 Tab Complete \u2022 ", suggestions.length, " ", suggestions.length === 1 ? 'command' : 'commands'] })] })), _jsxs(Box, { children: [_jsx(Text, { color: "#f02a30", bold: true, children: '> ' }), disabled ? (_jsx(Text, { children: "..." })) : (_jsx(TextInput, { value: value, onChange: handleChange, onSubmit: handleSubmit, placeholder: "Type a message or /command..." }))] })] }));
117
+ return (_jsxs(Box, { flexDirection: "column", children: [suggestions.length > 0 && (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [suggestions.map((s, i) => (_jsxs(Text, { children: [i === selectedIndex ? _jsx(Text, { color: "#f02a30", children: "\u25B8 " }) : ' ', _jsx(Text, { color: i === selectedIndex ? '#f02a30' : undefined, bold: i === selectedIndex, children: s.cmd }), _jsxs(Text, { color: i === selectedIndex ? undefined : 'gray', children: [" - ", s.desc] })] }, s.cmd))), _jsxs(Text, { color: "gray", children: ["\u2191\u2193 Navigate \u2022 Tab Complete \u2022 ", suggestions.length, " ", suggestions.length === 1 ? 'command' : 'commands'] })] })), _jsxs(Box, { children: [_jsx(Text, { color: "#f02a30", bold: true, children: '> ' }), disabled ? (_jsx(Text, { children: "..." })) : (_jsx(TextInput, { value: displayValue || value, onChange: handleChange, onSubmit: handleSubmit, placeholder: "Type a message or /command..." }))] })] }));
105
118
  };
@@ -11,7 +11,7 @@ import { planTasks, getNextTask, formatTaskPlan } from './taskPlanner.js';
11
11
  const DEFAULT_OPTIONS = {
12
12
  maxIterations: 100, // Increased for large tasks
13
13
  maxDuration: 20 * 60 * 1000, // 20 minutes
14
- usePlanning: true, // Enable task planning by default
14
+ usePlanning: false, // Disable task planning - causes more problems than it solves
15
15
  };
16
16
  /**
17
17
  * Generate system prompt for agent mode (used with native tool calling)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
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",