Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update removed code by inserting API replies with incomplete result #2175

Closed
pierrejoye opened this issue Nov 13, 2024 · 3 comments
Closed

Comments

@pierrejoye
Copy link

Describe the bug

At some points, or randomly, the backend replies with something incomplete and comments like:

that code is used ro fully replaced existing code without updating the relevant section of the code.

It is then very difficulty to ask it to rollback, it many times make things worst and I have to redo the full iterations (and use tokens for that :)

Link to the Bolt URL that caused the error

https://bolt.new/~/sb1-dkdnyn

Steps to reproduce

  1. create a working sample app
  2. Ask some updates
  3. at some points it replace all existing codes with partial results, breaking the app.

Expected behavior

Update the relevant section(s) of each file. Keeping others sections untouched. When such responses are returned by the API.

Screen Recording / Screenshot

image

this is the resulting code a much bigger file after asking a small update.

Platform

tried on linux and windows. Chrome and firefox as clients.

Additional context

No response

@endocytosis
Copy link
Collaborator

Appreciate the feedback! If you right-click a file in the Bolt IDE and select "Lock file" this will prevent the AI from making further changes to the file. This action can be performed on multiple files. Conversely, if you would just like the AI to modify one file, right-click that file and select "Target file". More general advice on using Bolt most effectively while maximizing token efficiency can be found here: #678. Hope this helps!

@pierrejoye
Copy link
Author

pierrejoye commented Nov 21, 2024

@endocytosis Thanks, I did not know this.

This is however a different issue.

The AI is updating a file. It gets a:

// ... previous imports remain the same

as response from the API.

And the AI replaces the full file with that response instead of actually adding or modifying what is needed. It happens quite a lot depending on the time of the day. Today is 1.2M token gone with this kind of responses. I am not sure if it is possible to control the behavior of the API and/or actually implement the parsing of that response and do the modification (complex/complicated).

Asking to restore the full content with the changes seems to get things works, it somehow gets lost with parsing the responses:

<content>
<template>
  <v-stepper v-model="step">
    <v-stepper-header>
      <v-stepper-item value="1">Account</v-stepper-item>
......
const goToDashboard = () => {
  router.push({ name: 'dashboard' })
}
</script>
</content>

Note the tag.

The other incomplete file remains incomplete, with the tag added around it.

@endocytosis
Copy link
Collaborator

Got it! Appreciate the additional feedback. We are tracking this issue here: #2862.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants