Skip to content

Possible Typo in completion.ts's getPrompt: Passing "fim-system.hbs" to readSystemMessageTemplate Causes Invalid Template Path #497

@HGChuang

Description

@HGChuang

I am reading Twinny's code and have found a piece of code that seems to contain a typo. In the getPrompt function of the completion.ts file, a systemMessage is defined and an attempt is made to retrieve it. The parameter passed to the readSystemMessageTemplate function is the string "fim-system.hbs". During the execution of the readSystemMessageTemplate function, the constructed templatePrefix becomes "fim-system.hbs-", and thus the templatePath becomes "fim-system.hbs-system.hbs". Obviously, this template does not exist in template.ts, so the defaultPath will be used by default. Unfortunately, however, "fim-system" is an empty string in template.ts. This is likely a typo—instead, the parameter passed in the getPrompt function of completion.ts should probably be "fim".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions