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

repeats almost the same steps over and over with the same results. #718

Closed
sparkes opened this issue Oct 18, 2024 · 1 comment
Closed

repeats almost the same steps over and over with the same results. #718

sparkes opened this issue Oct 18, 2024 · 1 comment

Comments

@sparkes
Copy link

sparkes commented Oct 18, 2024

Describe the bug

Could not resolve issue with Astro and pagination and burned though about 1 million tokens repeating the same steps.

Link to the Bolt URL that caused the error

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

Steps to reproduce

reproduction is difficult you need to get into loop with almost the same results tried continually. If staff have access to the history on the URL provided it shows the error pretty well.

Almost the same attempted fix each time. Many different attempts to prompt a fix including full stack of the errors and the LLM didn't deviate enough from the failed process to find success.

Expected behavior

I expect the LLM to check previous attempts when it seems to understand there have been multiple attempts and try a different route to resolution at that point.

Screen Recording / Screenshot

No response

Platform

Browser name = Chrome
Full version = 129.0.0.0
Major version = 129
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 60472714,
  "usedJSHeapSize": 54785130,
  "jsHeapSizeLimit": 4294705152
}
Username = sparkes
Chat ID = 43278c1df170

Additional context

This is the second such loop in a couple of days wasting about 2 million tokens in total. The problem is the errors I get don't help me provide extra context to the model because I only understand them in exactly the same way the model seems to and might take the same first step so I haven't been able to help the LLM format a better answer.

The error is pasted below.

PageNumberParamNotFound
Page number param not found.
[paginate()] page number param page not found in your filepath.
See Docs Reference
Rename your file to [page].astro or [...page].astro.
errors/errors.js:37:5
Open in editor
import { codeFrame } from "./printer.js";
function isAstroError(e) {
return e instanceof AstroError;
}
class AstroError extends Error {
loc;
title;
hint;
frame;
type = "AstroError";
constructor(props, options) {
const { name, title, message, stack, location, hint, frame } = props;
super(message, options);
this.title = title;
this.name = name;
if (message) this.message = message;
this.stack = stack ? stack : this.stack;
this.loc = location;
this.hint = hint;
this.frame = frame;
}
setLocation(location) {
this.loc = location;
}
setName(name) {
this.name = name;
}
setMessage(message) {
this.message = message;
}
setHint(hint) {
this.hint = hint;
}
setFrame(source, location) {
this.frame = codeFrame(source, location);
}
static is(err) {
^
return err.type === "AstroError";
}
}
class CompilerError extends AstroError {
type = "CompilerError";
constructor(props, options) {
super(props, options);
}
static is(err) {
return err.type === "CompilerError";
}
}
class CSSError extends AstroError {
type = "CSSError";
static is(err) {
return err.type === "CSSError";
}
}
class MarkdownError extends AstroError {
type = "MarkdownError";
static is(err) {
return err.type === "MarkdownError";
}
}
class InternalError extends AstroError {
type = "InternalError";
static is(err) {
return err.type === "InternalError";
}
}
class AggregateError extends AstroError {
type = "AggregateError";
errors;
// Despite being a collection of errors, AggregateError still needs to have a main error attached to it
// This is because Vite expects every thrown errors handled during HMR to be, well, Error and have a message
constructor(props, options) {
super(props, options);
this.errors = props.errors;
}
static is(err) {
return err.type === "AggregateError";
}
}
const astroConfigZodErrors = /* @PURE / new WeakSet();
function isAstroConfigZodError(error) {
return astroConfigZodErrors.has(error);
}
function trackAstroConfigZodError(error) {
astroConfigZodErrors.add(error);
}
class AstroUserError extends Error {
type = "AstroUserError";
/
*

  • A message that explains to the user how they can fix the error.
    */
    hint;
    name = "AstroUserError";
    constructor(message, hint) {
    super();
    this.message = message;
    this.hint = hint;
    }
    static is(err) {
    return err.type === "AstroUserError";
    }
    }
    export {
    AggregateError,
    AstroError,
    AstroUserError,
    CSSError,
    CompilerError,
    InternalError,
    MarkdownError,
    isAstroConfigZodError,
    isAstroError,
    trackAstroConfigZodError
    };
    Stack Trace
    PageNumberParamNotFound: [paginate()] page number param page not found in your filepath.
    at new AstroError (file:///home/project/node_modules/astro/dist/core/errors/errors.js:37:5)
    at paginateUtility (file:///home/project/node_modules/astro/dist/core/render/paginate.js:30:13)
    at eval (/home/project/src/pages/merchandise/[category].astro:20:12)
    at Module.getStaticPaths (/home/project/src/pages/merchandise/[category].astro:18:21)
    at async Module.callGetStaticPaths (file:///home/project/node_modules/astro/dist/core/render/route-cache.js:45:17)
    at async Module.getProps (file:///home/project/node_modules/astro/dist/core/render/params-and-props.js:30:23)
    at async Module.matchRoute (file:///home/project/node_modules/astro/dist/vite-plugin-astro-server/route.js:49:7)
    at async run (file:///home/project/node_modules/astro/dist/vite-plugin-astro-server/request.js:53:28)
    at async Module.runWithErrorHandling (file:///home/project/node_modules/astro/dist/vite-plugin-astro-server/controller.js:80:5)
@kc0tlh
Copy link
Collaborator

kc0tlh commented Oct 22, 2024

Please see issue #678 for advice on how to use tokens more efficiently

@kc0tlh kc0tlh closed this as completed Oct 22, 2024
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