Skip to content

Commit 07ca468

Browse files
committed
fix: address issue in cell autocomplete due to an off by one in the cursor position
1 parent 0f47446 commit 07ca468

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • packages/web/src/components/cells

packages/web/src/components/cells/code.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,12 @@ export default function ControlledCodeCell(props: Props) {
384384
inlineCopilot(async (prefix, suffix) => {
385385
let response;
386386
try {
387-
response = await runCodiumAiAutocomplete(prefix+suffix, prefix.length-1);
387+
response = await runCodiumAiAutocomplete(prefix+suffix, prefix.length);
388388
} catch (err) {
389389
console.error('Error fetching ai autocomplete suggestion:', err);
390390
return "";
391391
}
392392

393-
console.log('AUTOCOMPLETE RESPONSE:', response);
394393
if (response.error) {
395394
return "";
396395
}

0 commit comments

Comments
 (0)