AbanteAI / mentat

Mentat - The AI Coding Assistant
https://mentat.ai
Apache License 2.0
2.42k stars 226 forks source link

Add `load`/`save` context commands #534

Closed galer7 closed 4 months ago

galer7 commented 4 months ago

resolves #521

galer7 commented 4 months ago

Thanks for the review! I'll fix it this week

galer7 commented 4 months ago

Looks like an unlucky run.

I found the same issue here: https://github.com/RobertCraigie/pyright-python/issues/162. Proposed fix is to run brew install npm, so I guess I'll just try adding a actions/setup-node@v4 step in the CI.

galer7 commented 4 months ago

I agree, a .mentat folder for each project definitely sounds like a better default


Future idea: a context file per each new git branch, since that would be a new feature & you work on different aspects of your project with each feature

jakethekoenig commented 4 months ago

I like that the behavior of load is to add to the current context, not replace it. Maybe the help message for the command should be explicit that it does that?

I agree.

Maybe we should store context files somewhere other than the project root by default? Perhaps a .mentat directory we'd create in the project? That way users could easily add .mentat to their .gitignore. Users could already do this by just running /save .mentat/context_name but that'd be more work. @jakethekoenig what do you think?

Context files aren't saved to the project root by default they're saved to ~/.mentat/context.json. I think if the user does specify a name it would be confusing to append anything to it.

biobootloader commented 4 months ago

Context files aren't saved to the project root by default they're saved to ~/.mentat/context.json. I think if the user does specify a name it would be confusing to append anything to it.

Good point. Lets see how people use this. Maybe one context file is enough and naming it rare

mentatbot[bot] commented 4 months ago

MENTAT CODE REVIEW IN ACTIVE DEVELOPMENT. Only in use on mentat and internal repos. Please Reply with feedback.

The addition of load and save commands is a valuable feature, enhancing the flexibility and usability of context management in Mentat. The suggested changes aim to improve error handling and compatibility across different systems, ensuring a smooth user experience. It's also good to see the thoughtful consideration in the command design, such as appending to the current context rather than replacing it. Further discussions on default save locations and context management strategies indicate a forward-thinking approach to feature development.