Use Documentation

Hi there, I have been playing with Cursor Use Documentation.

I added a number of links in the doc settings and I try asking to the chat if it can come up with some of the code snippets in my docs.

The results are completely random, and doesn’t seems like understanding the docs at all.
I wonder if I am doing something wrong or there are limitations of this kind.

Thanks!

1 Like

Hey, can you describe what steps you took and what you got in response?

Sure thing

I added the following links on cursor doc settings
see image

  1. Git cloned one of these
    GitHub - Snapchat/Spectacles-Sample: Spectacles Sample Projects
  2. Opened 1 script using cursor
  3. Asked for a camera API code snippet
    Desired similar output from camera module documentation
@component
export class ContinuousCameraFrameExample extends BaseScriptComponent {
  private cameraModule: CameraModule = require('LensStudio:CameraModule');
  private cameraRequest: CameraModule.CameraRequest;
  private cameraTexture: Texture;
  private cameraTextureProvider: CameraTextureProvider;

  @input
  @hint('The image in the scene that will be showing the captured frame.')
  uiImage: Image | undefined;

  onAwake() {
    this.createEvent('OnStartEvent').bind(() => {
      this.cameraRequest = CameraModule.createCameraRequest();
      this.cameraRequest.cameraId = CameraModule.CameraId.Default_Color;

      this.cameraTexture = this.cameraModule.requestCamera(this.cameraRequest);
      this.cameraTextureProvider = this.cameraTexture
        .control as CameraTextureProvider;

      this.cameraTextureProvider.onNewFrame.add((cameraFrame) => {
        if (this.uiImage) {
          this.uiImage.mainPass.baseTex = this.cameraTexture;
        }
      });
    });
  }
}

code result is very inaccurate

from camera_api import CameraModule, CameraRequest, CameraType

# Initialize the CameraModule
camera_module = CameraModule()

# Create a CameraRequest for the desired camera and resolution
camera_request = CameraRequest(
    camera_type=CameraType.Left_Color,  # Choose from Left_Color, Right_Color, or SystemDefault_Color
    image_smaller_dimension=640  # Specify the smallest dimension in pixels
)

# Start receiving frames
camera_module.start_receiving_frames(camera_request)

# Callback function to handle received frames
def on_frame_received(frame):
    # Process the frame (e.g., display or save it)
    print("Received a frame with resolution:", frame.resolution)

# Register the callback
camera_module.set_frame_received_callback(on_frame_received)

# Stop receiving frames when done
# camera_module.stop_receiving_frames()

would it be better adding links of this kind?

would it be effective adding a repo as a link?

Additionally is there any guideline for having a website ai - crawl friendly using cursor?

Hey, to confirm, did you @ the docs into your query when you submitted it?

Also, no guide right now on how to make them crawler friendly, but could be a good one to add to docs.cursor.com

Thanks for getting back to me.

I did not @ the docs as I assumed that indexing in the settings was enough.
How would I @ the docs? what if I have like 10 of them, how would I go about it?

To put into an example, so let’s say

1.But I am expecting cursor to guess something as the information has been recursively indexed?

You can run a test yourself if you’d like

2.What is the recommended docs/links I should index and how would I make my prompt more efficient?
3.Should I use large context?
4.Should I use composer?
5.Can I insert like a repo of samples where I know there is quite significant code to my project? Is that effective?

Thanks