codeep 1.0.35 → 1.0.36

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.
@@ -79,15 +79,15 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
79
79
  lastInputTime.current = now;
80
80
  return false;
81
81
  };
82
- const handlePastedText = (text) => {
82
+ const handlePastedText = (text, fromCtrlV = false) => {
83
83
  const trimmed = text.trim();
84
84
  if (!trimmed)
85
85
  return;
86
86
  const lines = trimmed.split(/\r?\n/);
87
87
  const lineCount = lines.length;
88
88
  const charCount = trimmed.length;
89
- // For multi-line or long pastes, store info
90
- if (lineCount > 1 || charCount > 100) {
89
+ // For multi-line, long pastes, or explicit Ctrl+V - show indicator
90
+ if (lineCount > 1 || charCount > 100 || (fromCtrlV && charCount > 20)) {
91
91
  const firstLine = lines[0].substring(0, 60);
92
92
  const preview = firstLine + (lines[0].length > 60 ? '...' : '');
93
93
  setPasteInfo({
@@ -97,7 +97,7 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
97
97
  fullText: trimmed,
98
98
  });
99
99
  // Show only indicator in input field, NOT the actual pasted text
100
- const indicator = `📋 [${lineCount} lines, ${charCount} chars]`;
100
+ const indicator = `📋 Paste: ${charCount} chars`;
101
101
  // Replace entire value with just the indicator (don't append pasted text)
102
102
  setValue(indicator);
103
103
  setCursorPos(indicator.length);
@@ -117,7 +117,7 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
117
117
  if (key.ctrl && input === 'v') {
118
118
  clipboard.read().then(text => {
119
119
  if (text) {
120
- handlePastedText(text);
120
+ handlePastedText(text, true);
121
121
  }
122
122
  }).catch(() => { });
123
123
  return;
@@ -127,8 +127,8 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
127
127
  if (value.trim()) {
128
128
  let submitValue = value.trim();
129
129
  // Replace paste indicator with actual content
130
- if (pasteInfo && submitValue.includes('📋 [')) {
131
- submitValue = submitValue.replace(/📋 \[\d+ lines, \d+ chars\]/, pasteInfo.fullText);
130
+ if (pasteInfo && submitValue.includes('📋 Paste:')) {
131
+ submitValue = submitValue.replace(/📋 Paste: \d+ chars/, pasteInfo.fullText);
132
132
  }
133
133
  onSubmit(submitValue);
134
134
  setValue('');
@@ -142,7 +142,7 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
142
142
  if (key.escape) {
143
143
  if (pasteInfo) {
144
144
  // Remove paste indicator from value
145
- setValue(prev => prev.replace(/📋 \[\d+ lines, \d+ chars\]/, ''));
145
+ setValue(prev => prev.replace(/📋 Paste: \d+ chars/, ''));
146
146
  setPasteInfo(null);
147
147
  }
148
148
  else if (value) {
@@ -157,7 +157,7 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
157
157
  setValue(prev => prev.slice(0, cursorPos - 1) + prev.slice(cursorPos));
158
158
  setCursorPos(prev => prev - 1);
159
159
  // Clear paste info if we deleted the indicator
160
- if (pasteInfo && !value.includes('📋 [')) {
160
+ if (pasteInfo && !value.includes('📋 Paste:')) {
161
161
  setPasteInfo(null);
162
162
  }
163
163
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
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",