getcursor / cursor

The AI Code Editor
https://cursor.com
25.04k stars 1.56k forks source link

"New AI project": stopping working every time I try to make this Flutter project #928

Open danimesq opened 1 year ago

danimesq commented 1 year ago

OS: Ubuntu 23.04 DE: Cinnamon 5.8.X

Custom prompt Rules:

Every kind of project, according to their framework used, has their own particularities.

NodeJS

When creating any project that relies on NodeJS/NPM (such as ReactJS, ReactNative, Electron, Cordova, etc), you should add a package.json file containing all of the required node_modules. Ensure such a project come with a README.md explaining EVERY step necessary to build and put it to work.

Flutter

When developing in Flutter, don't use "RaisedButton" (old version of "ElevatedButton"), because you should expect we're not using an old version of Flutter; so when going to create such buttons, use "ElevatedButton" instead of when you would use "RaisedButton".

When creating a brand new Dart/Flutter project, create a init.sh file containing:

flutter pub get
flutter create --platforms=linux .

DON'T put the "" in that init.sh, also NEVER use "dart" (ending in "```") when creating .dart files, otherwise the files will be broken/unrecognizable! Ensure a Flutter project come with a README.md explaining EVERY step necessary to compile and put it to work. Create a Tasks.txt file whose content tells to place .dart files (such as main.dart and app.dart) at the /lib folder; even provide a Bash command to create such folder and move each .dart file into it.

Initial prompt to make an new AI project:

Let's build a Flutter (Dart) project.

This will be a replacement not for a full desktop environment, but for its desktop part.

Through the _NET_WM_WINDOW_TYPE_DESKTOP window property, the Cinnamon desktop environment supports replacing its Nemo-based desktop into any custom other.

This desktop replacement app should display in its whole screen (100%, cover) the desktop background, by getting the result from this CLI command: gsettings get org.cinnamon.desktop.background picture-uri | tr -d "'" Such command returns a Linux path starting with the "file://" protocol.

After displaying the user's desktop background, atop of it should be the desktop icons, right?

So, this Flutter app will run another Linux command under the hood: ls ~/Desktop

Then, with all of these ls'ed files/folders in mind, use a grid system to display them, with icons and filenames; through this grid system, these items can be moved freely and their positions will be remembered on next restarts. Run Nemo to open a folder, and XDG to open a file.

Response (has been cut/stopped in all 4 tries):

GENERATING PROJECT... Step 0 Computing project structure To create this Flutter project, we will need several Dart files to handle different aspects of the project. Here's a breakdown of the files we'll need:

  1. main.dart: This is the entry point of the Flutter application. It will call the runApp() function with our custom Flutter widget.
  2. desktop_background.dart: This file will handle the fetching and displaying of the desktop background. It will run the CLI command to get the desktop background and display it.
  3. desktop_icons.dart: This file will handle the fetching and displaying of the desktop icons. It will run the CLI command to get the desktop icons and display them in a grid system.
  4. icon_grid.dart: This file will handle the grid system for the desktop icons. It will allow the icons to be moved freely and remember their positions.
  5. file_folder_handler.dart: This file will handle the opening of files and folders. It will run Nemo to open a folder and XDG to open a file.
  6. app_state.dart: This file will handle the state of the application. It will remember the positions of the icons on the desktop. Now, let's call the function with these filenames:
    functions.outputFileNames({
    "fileNames": [
    "main.dart",
    "desktop_background.dart",
    "desktop_icons.dart",
    "icon_grid.dart",
    "file_folder_handler.dart",
    "app_state.dart"
    ]
    });

    [THEN STOPPED WORKING, IN ALL 4 TRIES]

billwood09 commented 1 year ago

This is happening to me too, I'm trying to create a react native app using a simple two sentence prompt that describes the frameworks to use and the pages to include. It stops after it finishes creating the list, sometimes goes into the first couple of files. It's burning a lot of my GPT-4 usage trying this repeatedly and I'd like to be able to get the output. I've tried with Cursor's allotted usage and with my OpenAI GPT-4 key.

Update: This also happens during all AI queries. My network connection is perfectly stable, and I've ruled out any other possible problems with the network. This only seems to happen with GPT-4; 3.5 does not time out, however it gets wacky trying to code --

Screenshot 2023-09-17 at 22 23 29

billwood09 commented 1 year ago

@truell20 I saw something from the summer where this sort of issue came up and was resolved on the server side? Did anything change in the last couple of weeks on the backend?

danimesq commented 1 year ago

In my side, this issue has been solved: was able to build that Flutter desktop replacement. But as @billwood09 pointed, this issue probably's still here ready to appear.

danimesq commented 1 year ago

Unfolding: now its happening even in Ctrl+K's "code" generation for a README.md:

Screenshot from 2023-09-18 15-30-39

billwood09 commented 1 year ago

I think it's having problems handling when GPT-4 slows down below a specific rate ~

billwood09 commented 1 year ago

Quick note: this is still happening ~

billwood09 commented 1 year ago

Now that the app is aware it is timing out and allows retries, this possibly confirms my suspicion... GPT-4 is timing out too quick.

rolltidehero commented 1 year ago

happening for me as well...

Now, let's call the outputFileNames function and provide the filenames in the correct order:

{
  "fileNames": [
   "index.html",
   "style.css",
   "script.js",
   "rclone.js",
   "sweetalert2.js",
   "fontawesome.js",
   "vue.js"
  ]
}