code-ollama 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +10 -6
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -50,7 +50,7 @@ var LIST$1 = [
50
50
  //#endregion
51
51
  //#region package.json
52
52
  var name = "code-ollama";
53
- var version = "0.23.0";
53
+ var version = "0.23.1";
54
54
  //#endregion
55
55
  //#region src/constants/package.ts
56
56
  var NAME = name;
@@ -1029,11 +1029,15 @@ function writeFile(filePath, content) {
1029
1029
  */
1030
1030
  function editFile(filePath, oldText, newText) {
1031
1031
  try {
1032
- if (!existsSync(filePath)) return {
1033
- content: "",
1034
- error: `File not found: ${filePath}`
1035
- };
1036
- const content = readFileSync(filePath, "utf8");
1032
+ let content;
1033
+ try {
1034
+ content = readFileSync(filePath, "utf8");
1035
+ } catch {
1036
+ return {
1037
+ content: "",
1038
+ error: `File not found: ${filePath}`
1039
+ };
1040
+ }
1037
1041
  if (!content.includes(oldText)) return {
1038
1042
  content: "",
1039
1043
  error: `Exact text not found in file: ${filePath}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-ollama",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "Ollama coding agent that runs in your terminal",
5
5
  "author": "Mark <mark@remarkablemark.org> (https://remarkablemark.org)",
6
6
  "type": "module",
@@ -40,7 +40,7 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "@inkjs/ui": "2.0.0",
43
- "@shikijs/cli": "4.1.0",
43
+ "@shikijs/cli": "4.2.0",
44
44
  "cac": "7.0.0",
45
45
  "ink": "7.0.5",
46
46
  "marked": "15.0.12",