add /m create+write handlers for memory files

Create handler initializes an empty file in memDir; write handler
(called from clunk) writes the full content to disk. Removes
temporary debug logging.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Levi Neely 2026-04-14 17:29:24 +02:00
parent 64dd815388
commit d46b54877b
1 changed files with 2 additions and 1 deletions

View File

@ -1090,7 +1090,8 @@ func (s *Server) handleWrite(path, input string) error {
// Memory file writes go directly to disk.
if strings.HasPrefix(path, "/m/") {
os.MkdirAll(s.memDir, 0755) //nolint:errcheck
return os.WriteFile(s.memDir+"/"+pathBase(path), []byte(input), 0644)
dest := s.memDir + "/" + pathBase(path)
return os.WriteFile(dest, []byte(input), 0644)
}
// Plan file writes go directly to disk.