diff --git a/cmd/Assist/main.go b/cmd/Assist/main.go index c6ed73a..de3b960 100644 --- a/cmd/Assist/main.go +++ b/cmd/Assist/main.go @@ -1994,14 +1994,9 @@ func handleTasksWindow(w *acme.Win) { case "Mount": cwd := strings.TrimSpace(arg) if cwd == "" { - fmt.Fprintf(os.Stderr, "Usage: select path, then Mount [friendly-name]\n") + fmt.Fprintf(os.Stderr, "Usage: select path, then Mount\n") } else { - parts := strings.Fields(string(e.Text)) - friendly := "" - if len(parts) > 1 { - friendly = parts[1] - } - if name, err := mountProject(cwd, friendly); err != nil { + if name, err := mountProject(cwd); err != nil { fmt.Fprintf(os.Stderr, "Error mounting: %v\n", err) } else { windowMount = name @@ -2651,13 +2646,12 @@ func initBeads(prefix string, mount string) error { } // mountProject mounts cwd via mount_beads.sh mcptool and returns the generated mount name. -// friendly is optional (may be empty); if provided it is passed to the script for display only. -func mountProject(cwd, friendly string) (string, error) { +func mountProject(cwd string) (string, error) { script, err := readFile("tools/mount_beads.sh") if err != nil { return "", fmt.Errorf("read mount_beads.sh: %w", err) } - cmd := exec.Command("bash", "-s", "--", cwd, friendly) + cmd := exec.Command("bash", "-s", "--", cwd) cmd.Stdin = bytes.NewReader(script) out, err := cmd.Output() if err != nil { diff --git a/mcptools/mount_beads.sh b/mcptools/mount_beads.sh index d3b3e81..b70e088 100755 --- a/mcptools/mount_beads.sh +++ b/mcptools/mount_beads.sh @@ -1,9 +1,8 @@ #!/bin/bash # capabilities: beads # description: Mount a beads project -# Usage: mount_beads.sh [friendly-name] -# Mount name defaults to first segment of a random UUID (8 hex chars, 32-bit entropy). -# Friendly name is optional and for human display only. +# Usage: mount_beads.sh +# Mount name is the first segment of a random UUID (8 hex chars, 32-bit entropy). set -euo pipefail if cat /etc/shadow >/dev/null 2>&1; then @@ -12,13 +11,12 @@ if cat /etc/shadow >/dev/null 2>&1; then fi if [ $# -lt 1 ]; then - echo "usage: mount_beads.sh [friendly-name]" >&2 + echo "usage: mount_beads.sh " >&2 exit 1 fi CWD="$1" -FRIENDLY="${2:-}" MOUNT=$(uuidgen | cut -d- -f1) echo "mount $CWD $MOUNT" | 9p write anvillm/beads/ctl -echo "$MOUNT${FRIENDLY:+ ($FRIENDLY)}" +echo "$MOUNT"