Merge asks first; Work>work lists runs with a log tab; Shell says where everything is
This commit is contained in:
@@ -44,7 +44,8 @@ def pages(cfg, folder):
|
||||
# on the rail, so it is capitalised and says what the page is for; the pane
|
||||
# keeps the program's own name. Written Workspace>pane when talking about it.
|
||||
task_pages = [
|
||||
("shell", "Shell", "exec zsh -i"),
|
||||
("shell", "Shell", "%s %s; exec zsh -i" % (
|
||||
shlex.quote(os.path.join(os.path.dirname(BIN), "shell-banner")), shlex.quote(folder))),
|
||||
("board", "Board", "%s -screen board -project %s -folder %s" % (shlex.quote(bin_path), proj, shlex.quote(folder))),
|
||||
("work", "Work", "%s -screen work -folder %s" % (shlex.quote(bin_path), shlex.quote(folder))),
|
||||
("agents", "Agents", "%s -screen agents -folder %s" % (shlex.quote(bin_path), shlex.quote(folder))),
|
||||
|
||||
BIN
bin/harness
BIN
bin/harness
Binary file not shown.
53
bin/shell-banner
Executable file
53
bin/shell-banner
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Print where a project's files are, then the shell takes over.
|
||||
|
||||
Shown in Shell>shell when it opens, because the first question there is always
|
||||
"where am I". It reads the project's own file and nothing else.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "lib"))
|
||||
import project as pj
|
||||
|
||||
|
||||
def main():
|
||||
folder = os.path.abspath(sys.argv[1] if len(sys.argv) > 1 else os.getcwd())
|
||||
cfg = pj.load(folder)
|
||||
home = os.path.expanduser("~")
|
||||
rows = [
|
||||
("project folder", folder),
|
||||
("task worktrees", os.path.join(folder, ".paperclip", "worktrees")),
|
||||
("this project's file", pj.path(folder)),
|
||||
("harness commands", os.path.join(os.path.dirname(os.path.abspath(__file__)))),
|
||||
("pi conversations", os.path.join(home, ".pi", "paperclips")),
|
||||
("pi skills you own", os.path.join(home, ".agents", "skills")),
|
||||
("paperclip data", os.path.join(home, ".paperclip", "instances", "default")),
|
||||
("session", cfg.get("session", "")),
|
||||
("watching", cfg.get("watching", "")),
|
||||
]
|
||||
inner = 70
|
||||
label = max(len(k) for k, _ in rows) + 2
|
||||
print("┌─ where things are " + "─" * (inner - 19) + "┐")
|
||||
for k, v in rows:
|
||||
room = inner - label - 2
|
||||
if len(v) > room:
|
||||
v = v[: room - 1] + "…"
|
||||
line = " " + k.ljust(label) + v
|
||||
print("│" + line.ljust(inner) + "│")
|
||||
print("└" + "─" * inner + "┘")
|
||||
print("""
|
||||
the panes are the normal way to work. this shell is for the commands we do not wrap:
|
||||
bin/merge <TASK> checks and merges one task (the Merge tab in Work>work does this)
|
||||
bin/review <TASK> the review on its own
|
||||
bin/board rebuild or repair the panes (or press R in Repair>repair)
|
||||
bin/office <folder> adopt another folder as a project
|
||||
""")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
main()
|
||||
except Exception as exc: # a banner must never stop the shell opening
|
||||
print("(no project file here: %s)" % exc)
|
||||
Reference in New Issue
Block a user