ideacode 1.1.7 → 1.1.9

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.
package/dist/repl.js CHANGED
@@ -434,7 +434,7 @@ export function Repl({ apiKey, cwd, onQuit }) {
434
434
  appendLog(userPromptBox(userInput));
435
435
  appendLog("");
436
436
  let state = [...messages, { role: "user", content: userInput }];
437
- const systemPrompt = `Concise coding assistant. cwd: ${cwd}. Use focused greps (specific patterns, narrow paths) and read in chunks when files are large; avoid one huge grep or read that floods context. When exploring a dependency, set path to that package (e.g. node_modules/<pkg>) and list/read only what you need. Prefer grep or keyword search for the most recent or specific occurrence; avoid tail/read of thousands of lines. If a tool result says it was truncated, call the tool again with offset, limit, or a narrower pattern to get what you need.`;
437
+ const systemPrompt = `Concise coding assistant. cwd: ${cwd}. PRIORITIZE grep to locate; then read with offset and limit to fetch only relevant sections. Do not read whole files unless the user explicitly asks. Use focused greps (specific patterns, narrow paths) and read in chunks when files are large; avoid one huge grep or read that floods context. When exploring a dependency, set path to that package (e.g. node_modules/<pkg>) and list/read only what you need. Prefer grep or keyword search for the most recent or specific occurrence; avoid tail/read of thousands of lines. If a tool result says it was truncated, call the tool again with offset, limit, or a narrower pattern to get what you need.`;
438
438
  const modelContext = modelList.find((m) => m.id === currentModel)?.context_length;
439
439
  const maxContextTokens = Math.floor((modelContext ?? CONTEXT_WINDOW_K * 1024) * 0.85);
440
440
  const stateBeforeCompress = state;
@@ -867,6 +867,9 @@ export function Repl({ apiKey, cwd, onQuit }) {
867
867
  setShowHelpModal(true);
868
868
  return;
869
869
  }
870
+ if (input === "[I" || input === "[O") {
871
+ return;
872
+ }
870
873
  if (input && !key.ctrl && !key.meta) {
871
874
  setInputValue((prev) => prev.slice(0, cur) + input + prev.slice(cur));
872
875
  setInputCursor(cur + input.length);
@@ -5,7 +5,7 @@ import { runBash } from "./bash.js";
5
5
  import { webFetch, webSearch } from "./web.js";
6
6
  export const TOOLS = {
7
7
  read: [
8
- "Read file with line numbers (file path, not directory). Use limit and offset to read a portion; avoid reading huge files in one go. Long output is truncated; use offset/limit to get more.",
8
+ "Read a portion of a file with line numbers (file path, not directory). Prefer offset and limit for anything beyond a small file; do not read entire large files in one call. Long output is truncated; use offset/limit to get more.",
9
9
  { path: "string", offset: "number?", limit: "number?" },
10
10
  readFile,
11
11
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ideacode",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "CLI TUI for AI agents via OpenRouter — agentic loop, tools, markdown",
5
5
  "type": "module",
6
6
  "repository": {
@@ -34,7 +34,7 @@
34
34
  "chalk": "^5.6.2",
35
35
  "cli-highlight": "^2.1.11",
36
36
  "dotenv": "^17.2.3",
37
- "glob": "^11.0.0",
37
+ "glob": "^13.0.1",
38
38
  "gradient-string": "^3.0.0",
39
39
  "ink": "^5.1.0",
40
40
  "marked": "^15.0.12",