Feat/codra code v0.1.2#51
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a252ee2852
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const config = loadPermissionConfig(); | ||
| config.level = level; | ||
| savePermissionConfig(config); |
There was a problem hiding this comment.
Enforce permission levels before side effects
After /permissions set read-only, this only persists the selected level; I checked the repo with rg "loadPermissionConfig", and no file-editing or command-execution path reads this config. That means users can still run /write, /append, /apply, or /run after choosing read-only, so the new permission policy is displayed as active but is not actually enforced.
Useful? React with 👍 / 👎.
| // Create visual plan from plan ID | ||
| const planId = args[0]; | ||
| const plan = getVisualPlan(planId); | ||
| if (plan) { |
There was a problem hiding this comment.
Generate visual plans from plan ids
For the documented /visual-plan <planId> flow, this branch looks up the id in the visual-plan store instead of calling the imported createVisualPlanFromPlanId() and saving the result. A normal plan id is stored under .codra/plans, so using /visual-plan <id> immediately after /plan <task> falls through to the usage text unless a visual plan happens to already have that same id.
Useful? React with 👍 / 👎.
| approvePlan.approval.status = 'approved'; | ||
| approvePlan.approval.approvedAt = new Date().toISOString(); | ||
| approvePlan.updatedAt = new Date().toISOString(); | ||
| saveVisualPlan(approvePlan); |
There was a problem hiding this comment.
Keep visual-plan status in sync on approval
When /visual-plan approve <id> succeeds, only approval.status changes while the top-level status remains draft; /visual-plans and the console/export formatters display the top-level plan.status. As a result approved visual plans continue to list and export as draft, making the approval command appear ineffective.
Useful? React with 👍 / 👎.
| const configPath = path.join(process.cwd(), '.codra', 'activity.json'); | ||
| const config = getActivityConfig(); | ||
| config.enabled = false; | ||
| fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); |
There was a problem hiding this comment.
Create
.codra before saving activity config
On a fresh project with no .codra directory, /activity off reaches this writeFileSync before anything has created the parent directory, so it throws ENOENT and drops the user out of the command instead of disabling tracking. The on path has the same issue; create the parent directory like the other stores do before writing activity.json.
Useful? React with 👍 / 👎.
| .name('codra-code') | ||
| .description('Codra Code: A local-first, open-source coding agent for real software work') | ||
| .version('0.1.6'); | ||
| .version('0.2.3'); |
There was a problem hiding this comment.
Keep CLI version aligned with package metadata
This hard-codes --version to 0.2.3, but apps/code/package.json and the lockfile still publish @talocode/codra-code as 0.1.6. In a release built from this commit, npm would install a 0.1.6 package whose binary reports 0.2.3, which breaks version-based support and release verification.
Useful? React with 👍 / 👎.
| export function logToolCall(toolCall: ToolCall): void { | ||
| try { | ||
| ensureToolCallsDir(); | ||
| const sanitized = sanitizeToolCall(toolCall); | ||
| const line = JSON.stringify(sanitized) + '\n'; | ||
| fs.appendFileSync(EVENTS_FILE, line); |
There was a problem hiding this comment.
Record tool calls before exposing the log commands
/tools log, /tools recent, and /tools thread depend on events.jsonl, but logToolCall is never called from the command, provider, file, git, MCP, or plugin paths in apps/code/src. In real CLI sessions this makes the new tool-call UI permanently report no tool calls even after commands and file operations have run.
Useful? React with 👍 / 👎.
| - `codra understand` scans a repository and writes a local graph summary. | ||
| - `codra memory status` inspects memory files. | ||
| - `codra harness init` creates `.codra/harness/`. | ||
| - `codra harness status` shows detected harness state. | ||
| - `codra harness doctor` validates harness files and JSON. |
There was a problem hiding this comment.
Document only implemented CLI commands
These docs advertise codra understand and codra harness ..., but I checked crates/codra-cli/src/main.rs and rg "harness|understand" crates/codra-cli/src; there are no command handlers for them. Users following this page will just get the CLI help instead of the graph scan or harness files described here.
Useful? React with 👍 / 👎.
|
|
||
| # Render video | ||
| echo "Rendering video..." | ||
| npx remotion render src/index.ts CodraLaunchVideo "${OUTPUT_FILE}" --codec h264 |
There was a problem hiding this comment.
Render from the Remotion project directory
This command is relative to the caller's working directory, but the script never changes into SCRIPT_DIR. Running apps/code/demo/remotion/render.sh from the repo root will look for src/index.ts and node_modules in the repo root rather than apps/code/demo/remotion, so the render fails or installs dependencies in the wrong place.
Useful? React with 👍 / 👎.
| const resumeThread = getThread(args[1]); | ||
| if (resumeThread) { | ||
| resumeThread.updatedAt = new Date().toISOString(); | ||
| saveThread(resumeThread); | ||
| console.log(chalk.green(`\n Thread resumed: ${resumeThread.title}\n`)); |
There was a problem hiding this comment.
Make resumed threads drive the active conversation
/thread resume <id> only updates the saved thread timestamp; I checked the REPL/session paths and no current-thread state is set or read when later messages are saved. After a user resumes a thread, subsequent prompts still go into the current session/message history and the thread's message/tool counts remain unchanged, so the resume command does not actually resume the conversation.
Useful? React with 👍 / 👎.
| @@ -0,0 +1,31 @@ | |||
| # Model Providers | |||
|
|
|||
| Codra supports provider-agnostic model configuration through the global user config at `~/.codra/config.toml`. | |||
There was a problem hiding this comment.
Match provider docs to the implemented config files
This points users at ~/.codra/config.toml, but the current implementations read JSON files instead: apps/code reads ~/.codra/config.json, and the Rust ProviderConfigService reads workspace .codra/provider_config.json plus .codra/provider_secret.key. A TOML config written from these instructions will be ignored, and the documented global-only credential model will not match actual behavior.
Useful? React with 👍 / 👎.
- Premium dark terminal interface with branded ASCII logo header - Status line: mode, provider/model, permission level, active skills - Composer placeholder with command hint - Keyboard shortcut hints (/, tab, @, ctrl+c) - Onboarding tips (rotating daily) - Project path and version footer - --tui / --no-tui flags for control - Terminal capability detection (TTY, width, CI) - Graceful fallback to classic REPL - Skill discovery, recommendation, and activation system - Multi-skill support with context protection - Skill recommendations in /plan output - Breaking circular dependency in watch.ts → repl.ts - All existing commands preserved
- Fixed package.json version from 0.1.6 to 0.2.3 - Aligned CHANGELOG headers to v0.2.3 - Aligned README header to v0.2.3 - CLI version, package.json, tarball, and docs now all agree
- Codra web context for using public docs and approved URLs as project context - Context storage under .codra/context/web/ - Integration with plans and threads - Provider context injection with compression - Future: /context add-url, /context web search, /context refresh - Privacy rules and token budget
- Project analyzer: detects package manager, project type, stack, frameworks - Recommendation engine: maps detected stack to skills, commands, context files, hooks, permissions - Setup format: displays analysis and recommendations in terminal - Setup store: saves reports to .codra/setup/latest.json and latest.md - /setup command: analyze, recommend, status, apply subcommands - /setup is public command (no auth required) - Risk detection: missing context files, no tests, no build - Next steps: actionable guidance for project improvement - Integration with help command
No description provided.