Skip to content

Commit

Permalink
revert change on ts
Browse files Browse the repository at this point in the history
  • Loading branch information
leehuwuj committed Nov 20, 2024
1 parent 6b91ffe commit cfac420
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion helpers/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export const copyVSCodeSettings = async (
root: string,
templatesDir: string,
) => {
// Create .vscode folder
const vscodeDir = path.join(root, ".vscode");
await copy("vscode_settings.json", vscodeDir, {
cwd: templatesDir,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function generateNextQuestions(conversation: ChatMessage[]) {
}

// TODO: instead of parsing the LLM's result we can use structured predict, once LITS supports it
function extractQuestions(text: string): string[] | null {
function extractQuestions(text: string): string[] {
// Extract the text inside the triple backticks
// @ts-ignore
const contentMatch = text.match(/```(.*?)```/s);
Expand All @@ -39,5 +39,5 @@ function extractQuestions(text: string): string[] | null {
.map((question) => question.trim())
.filter((question) => question !== "");

return questions.length > 0 ? questions : null;
return questions;
}

0 comments on commit cfac420

Please sign in to comment.