[Sync] Pi chat mode + plan-mode rework, fastfetch icons, Claude statusline, fl KDE shortcuts
Re-export of the private tree at b5580f8 (2026-11-11). - pi: new chat-mode extension, plan-mode rework, README and settings updates, version bump - fastfetch: Packages/Display/WM/GPU/Memory key icons moved off the legacy Nerd Fonts v2 Material range (blank on v3 fonts) to Font Awesome glyphs - claude: statusline runs git with --no-optional-locks, model default, pr-loop skill note, gh sync fix - fl: kglobalshortcutsrc update
This commit is contained in:
1 parent
47166d877f
commit
78354d9afe
9 files changed
+255
-41
No files matched your search
@@ -87,7 +87,6 @@
|
||||
],
|
||||
"defaultMode": "auto"
|
||||
},
|
||||
"model": "opus",
|
||||
"hooks": {
|
||||
"SessionStart": [
|
||||
{
|
||||
|
||||
@@ -230,6 +230,10 @@ Current state (auth + the current branch's PR):
|
||||
```
|
||||
`COMMENT_NODE_ID` is the `relevantComments[].id` (`IC_…`). Never minimize unpushed work, a
|
||||
"needs input" comment, or a summary/status/usage-limit comment.
|
||||
- **Sync the status line** in any cycle where you resolved or minimized something (step 6, or
|
||||
a 👎): `python3 ~/.claude/statusline.py --pr-sync` — one foreground GitHub call that
|
||||
rewrites the branch's cached 💬 count. Without it the bar keeps the count from its last
|
||||
render until something re-renders it, which can be an hour on an idle session.
|
||||
|
||||
9. **Draft the commit message — exactly like `/commit-msg`:** from the staged diff and the repo's
|
||||
recent `git log` style (this repo uses `[Scope] summary`), write a message that matches. Then:
|
||||
|
||||
@@ -393,7 +393,7 @@ def dir_segment(cwd, top=None):
|
||||
|
||||
def _git(cwd, *args):
|
||||
return subprocess.run(
|
||||
["git", "-C", cwd, *args], capture_output=True, text=True, timeout=1
|
||||
["git", "--no-optional-locks", "-C", cwd, *args], capture_output=True, text=True, timeout=1
|
||||
)
|
||||
|
||||
|
||||
@@ -508,6 +508,24 @@ def pr_refresh(cwd, branch, path):
|
||||
pass
|
||||
|
||||
|
||||
def pr_sync(cwd):
|
||||
"""Foreground half (`statusline.py --pr-sync [CWD]`): refresh the current branch's counts
|
||||
now and print them. For a caller that just changed them -- pr-loop resolving a thread --
|
||||
so the next render shows the new count rather than the cached one, which is otherwise
|
||||
only refreshed by a render that finds it older than PR_TTL."""
|
||||
top = git_top(cwd)
|
||||
branch = _git(cwd, "rev-parse", "--abbrev-ref", "HEAD").stdout.strip() if top else ""
|
||||
if not top or not branch or branch == "HEAD":
|
||||
sys.exit("statusline --pr-sync: not on a branch")
|
||||
path = _pr_cache_path(top, branch)
|
||||
pr_refresh(cwd, branch, path)
|
||||
state = _read_json(path)
|
||||
if state.get("error"):
|
||||
sys.exit("statusline --pr-sync: fetch failed")
|
||||
num = state.get("number")
|
||||
print(f"#{num} open={state.get('open') or 0} codex={state.get('codex') or 0}" if num else "no open PR")
|
||||
|
||||
|
||||
def pr_segment(cwd, top):
|
||||
"""Unresolved review threads (any author, outdated ones included) on the current branch's
|
||||
open PR: `💬 #N ✓` when none are left, else the count with Codex's share broken out.
|
||||
@@ -515,8 +533,11 @@ def pr_segment(cwd, top):
|
||||
A GitHub round trip takes ~0.7 s, too slow for a render, so this only reads a per-branch
|
||||
cache (~/.claude/cache/statusline.pr.<hash>.json) and, once it is older than PR_TTL,
|
||||
spawns a detached `--pr-refresh` child to update it -- the new count shows on the next
|
||||
render. PR-conversation comments are not counted: they have no resolved state, so a
|
||||
summary or an LGTM would keep the count from ever reaching zero.
|
||||
render. Nothing re-renders on its own between events, so a count can sit stale for as long
|
||||
as the session is idle; a caller that changes the threads itself runs `--pr-sync`
|
||||
(pr_sync) to rewrite the cache at once. PR-conversation comments are not counted: they
|
||||
have no resolved state, so a summary or an LGTM would keep the count from ever reaching
|
||||
zero.
|
||||
"""
|
||||
try:
|
||||
if not top or not shutil.which("gh"):
|
||||
@@ -881,6 +902,9 @@ def main():
|
||||
if sys.argv[1:2] == ["--pr-refresh"] and len(sys.argv) == 5:
|
||||
pr_refresh(*sys.argv[2:])
|
||||
return
|
||||
if sys.argv[1:2] == ["--pr-sync"] and len(sys.argv) <= 3:
|
||||
pr_sync(sys.argv[2] if len(sys.argv) == 3 else os.getcwd())
|
||||
return
|
||||
try:
|
||||
data = json.load(sys.stdin)
|
||||
except Exception:
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
},
|
||||
{
|
||||
"type": "packages",
|
||||
"key": " Packages",
|
||||
"key": " Packages",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "display",
|
||||
"key": " Display",
|
||||
"key": " Display",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "wm",
|
||||
"key": " WM",
|
||||
"key": " WM",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
{
|
||||
@@ -68,7 +68,7 @@
|
||||
{
|
||||
"type": "gpu",
|
||||
"format": "{2}",
|
||||
"key": " GPU",
|
||||
"key": " GPU",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
@@ -79,7 +79,7 @@
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"key": " Memory",
|
||||
"key": " Memory",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user