claude-memory-agent 2.2.1 → 2.2.2
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/install.py +14 -4
- package/package.json +1 -1
- package/requirements.txt +1 -1
package/install.py
CHANGED
|
@@ -91,10 +91,15 @@ def print_error(text: str):
|
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
def prompt_yes_no(question: str, default: bool = True) -> bool:
|
|
94
|
-
"""Prompt for yes/no answer."""
|
|
94
|
+
"""Prompt for yes/no answer. Returns default if stdin is not a TTY or EOF."""
|
|
95
|
+
if not sys.stdin.isatty():
|
|
96
|
+
return default
|
|
95
97
|
suffix = " [Y/n]: " if default else " [y/N]: "
|
|
96
98
|
while True:
|
|
97
|
-
|
|
99
|
+
try:
|
|
100
|
+
answer = input(question + suffix).strip().lower()
|
|
101
|
+
except EOFError:
|
|
102
|
+
return default
|
|
98
103
|
if not answer:
|
|
99
104
|
return default
|
|
100
105
|
if answer in ("y", "yes"):
|
|
@@ -105,8 +110,13 @@ def prompt_yes_no(question: str, default: bool = True) -> bool:
|
|
|
105
110
|
|
|
106
111
|
|
|
107
112
|
def prompt_value(question: str, default: str) -> str:
|
|
108
|
-
"""Prompt for a value with a default."""
|
|
109
|
-
|
|
113
|
+
"""Prompt for a value with a default. Returns default if stdin is not a TTY or EOF."""
|
|
114
|
+
if not sys.stdin.isatty():
|
|
115
|
+
return default
|
|
116
|
+
try:
|
|
117
|
+
answer = input(f"{question} [{default}]: ").strip()
|
|
118
|
+
except EOFError:
|
|
119
|
+
return default
|
|
110
120
|
return answer if answer else default
|
|
111
121
|
|
|
112
122
|
|
package/package.json
CHANGED
package/requirements.txt
CHANGED