From ba2e684f812a21952c1190813cf400dadb0df7cc Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 19 Sep 2023 12:56:31 -0700 Subject: docs: :memo: update codellama documentation --- docs/docs/walkthroughs/codellama.md | 5 +++-- extension/src/continueIdeClient.ts | 13 ++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/docs/walkthroughs/codellama.md b/docs/docs/walkthroughs/codellama.md index ffdd51e5..b6ee2c22 100644 --- a/docs/docs/walkthroughs/codellama.md +++ b/docs/docs/walkthroughs/codellama.md @@ -79,8 +79,9 @@ config = ContinueConfig( ... models=Models(default=OpenAI( model="CodeLlama-7b-Instruct-hf", - openai_server_info={'api_base': 'http://localhost:8000/v1'}) - + api_base="http://localhost:8000/v1" + )) +) ``` 4. Reload the VS Code window for changes to take effect. diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts index 3b46d90a..5c04e351 100644 --- a/extension/src/continueIdeClient.ts +++ b/extension/src/continueIdeClient.ts @@ -298,11 +298,18 @@ class IdeProtocolClient { }); break; case "listDirectoryContents": - messenger.send("listDirectoryContents", { - contents: await this.getDirectoryContents( + let contents: string[] = []; + try { + contents = await this.getDirectoryContents( data.directory, data.recursive || false - ), + ); + } catch (e) { + console.log("Error listing directory contents: ", e); + contents = []; + } + messenger.send("listDirectoryContents", { + contents, }); break; case "editFile": -- cgit v1.2.3-70-g09d2