From 6267fb5d795ca665256173cc833ae3b5c202b64d Mon Sep 17 00:00:00 2001 From: Daisuke Date: Sun, 1 Mar 2026 17:36:10 +0900 Subject: [PATCH 1/5] docs: Add Podman development recommendations to Copilot instructions - Add 'Recommended Development Setup' section highlighting Podman as the recommended development approach - Organize Commands section into two subsections: 'Local Development (with Podman)' and 'Direct Commands (without Podman)' - Include examples for podman compose commands (up --build, up -d, exec) - Reference README.md for detailed container setup instructions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 8aade0f..aa0b0be 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -28,7 +28,23 @@ This is a personal blog named "Naputo" built with Astro and Preact. The blog is ## Development Guidelines +### Recommended Development Setup + +**Development via Podman (Recommended)**: This repository is designed to be developed inside a Podman container for consistency and reproducibility. See README.md for complete container setup instructions. + +- Run `podman compose up --build` to start development +- Run commands in the container with `podman compose exec app ` +- This keeps your host environment clean and ensures reproducible builds + ### Commands + +#### Local Development (with Podman - Recommended) +- `podman compose up --build`: Start development container with auto-rebuild +- `podman compose up -d`: Start development container in background +- `podman compose exec app npm run dev`: Start dev server inside container +- `podman compose exec app npm run build`: Build inside container + +#### Direct Commands (without Podman) - `npm install`: Install dependencies - `npm run dev`: Start local development server at `localhost:4321` - `npm run build`: Build production site to `./dist/` From a8d02ed52467acfad0d483e4e2a6e3b620684844 Mon Sep 17 00:00:00 2001 From: Daisuke Date: Sun, 1 Mar 2026 17:36:15 +0900 Subject: [PATCH 2/5] chore: Remove commit-message-generator skill definition file - Remove SKILL.md as the commit message generation functionality is now integrated into the standard workflow - Commit message suggestions can be generated directly during development without separate skill configuration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../skills/commit-message-generator/SKILL.md | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 .github/skills/commit-message-generator/SKILL.md diff --git a/.github/skills/commit-message-generator/SKILL.md b/.github/skills/commit-message-generator/SKILL.md deleted file mode 100644 index 19ff1f1..0000000 --- a/.github/skills/commit-message-generator/SKILL.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: commit-message-generator -description: Generate appropriate commit messages based on Git diffs ---- - -## Prerequisites -- This Skill retrieves Git diffs and suggests meaningful commit messages -- Message format should follow Conventional Commits -- Commit messages should have a one-line Conventional Commits header, an optional blank second line, and from the third line onward include a bulleted list summarizing the changes -- Commit messages should be in English -- **Never perform Git commit or Git push** - -## Steps -1. Run `git status` to check modified files -2. Retrieve diffs with `git diff` or `git diff --cached` -3. Analyze the diff content and determine if changes should be split into multiple commits -4. For each logical group of changes: - - List the target files - - Generate a message in English compliant with Conventional Commits - - Suggest the command: `git add && git commit -m ""` -5. If changes are extensive and should be split, provide: - - Rationale for the split - - Multiple commit suggestions with their respective target files and messages - -## Commit Splitting Guidelines -- Split commits when changes span multiple logical concerns (e.g., feature + refactoring) -- Group related files that serve the same purpose -- Keep each commit focused on a single, atomic change - -## Notes -- **This Skill must never execute `git commit` or `git push`** -- Only suggest commands; execution is entirely at user's discretion -- Users must explicitly perform commits and pushes themselves From 4e8962a8b48983e09c2d9d3603c20535e287471a Mon Sep 17 00:00:00 2001 From: Daisuke Date: Sun, 1 Mar 2026 18:15:15 +0900 Subject: [PATCH 3/5] feat(blog): add article on agent-shell session selection in Emacs - Add new blog post about configuring agent-shell to prompt for session selection - Article includes prerequisites with Emacs and Copilot CLI versions - Covers configuration method using agent-shell-session-strategy setting - Provides practical use case for managing multiple projects efficiently - Originally written in Japanese, reviewed for clarity, and translated to English Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...026-03-01-agent-shell-session-selection.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/blog/2026-03-01-agent-shell-session-selection.md diff --git a/src/blog/2026-03-01-agent-shell-session-selection.md b/src/blog/2026-03-01-agent-shell-session-selection.md new file mode 100644 index 0000000..a64412b --- /dev/null +++ b/src/blog/2026-03-01-agent-shell-session-selection.md @@ -0,0 +1,59 @@ +--- +title: 'How to Select Sessions When Starting the agent-shell ACP Client Running on Emacs' +pubDate: 2026-03-01 +author: 'Nakahara Daisuke' +tags: ["Emacs"] +--- + +I recently returned to Emacs, motivated by CLI-type AI tools like [GitHub Copilot CLI](https://github.com/github/copilot-cli). + +Copilot CLI supports ACP (Agentic Communication Protocol), which enables communication between AI agents and editors ([GitHub official documentation](https://docs.github.com/en/copilot/reference/acp-server)). +And [agent-shell](https://github.com/xenodium/agent-shell) is an ACP client that runs on Emacs. + +agent-shell can be started with `M-x agent-shell`. +By default, starting agent-shell creates a new session. However, with the following configuration change, you can choose to create a new session or select from past sessions when starting. I'll introduce this configuration. + +## Prerequisites + +```bash +$ emacs --version +GNU Emacs 30.2 +Development version 636f166cfc86 on HEAD branch; build date 2025-12-14. +Copyright (C) 2025 Free Software Foundation, Inc. +GNU Emacs comes with ABSOLUTELY NO WARRANTY. +You may redistribute copies of GNU Emacs +under the terms of the GNU General Public License. +For more information about these matters, see the file named COPYING. +``` + +This article assumes the use of Copilot CLI. + +```bash +$ copilot --version +GitHub Copilot CLI 0.0.420. +Run 'copilot update' to check for updates. +``` + +After starting Emacs, the result of running `M-x agent-shell-version` is as follows: + +``` +agent-shell v0.43.1 +``` + +## Method + +Set the value of `agent-shell-session-strategy` to `prompt`. +Here is an example configuration in `init.el`: + +```elisp +(use-package agent-shell + :custom + (agent-shell-session-strategy 'prompt) + :ensure t) +``` + +With this configuration, you can create a new session or select from history in the minibuffer. Selecting a new session behaves the same as the default behavior, but selecting a past session allows you to resume work in that session's context. This enables you to efficiently manage multiple different projects and tasks. + +--- + +> **Note**: The review and translation were assisted by an AI generative model. The author is responsible for the final content. From c3a0a5c434419dc01dadfbd0a4c2bd7232153ac9 Mon Sep 17 00:00:00 2001 From: Daisuke Date: Sun, 1 Mar 2026 19:18:25 +0900 Subject: [PATCH 4/5] Improve code block visibility with dual Shiki themes - Configure Shiki with github-light and github-dark themes - Apply Shiki dark mode CSS variables to .astro-code elements - Follow Astro official documentation for dual theme implementation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/styles/global.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/styles/global.css b/src/styles/global.css index c94e447..39ad246 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -130,7 +130,10 @@ pre { overflow-x: auto; } -html.dark pre { - background-color: #1e293b !important; +html.dark .astro-code, +html.dark .astro-code span { + color: var(--shiki-dark) !important; + background-color: var(--shiki-dark-bg) !important; } + From b1176331aec9db01a83c9ee2ac39199ee06d3868 Mon Sep 17 00:00:00 2001 From: Daisuke Date: Sun, 1 Mar 2026 19:50:23 +0900 Subject: [PATCH 5/5] docs(blog): Update Forgejo CLI article and agent shell session selection - 2026-02-01: Clarify and refine wording and steps in the Forgejo CLI guide - 2026-03-01: Add and adjust explanation for agent shell session selection Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...d-forgejo-via-cli-a-forgejo-cli-guide-2.md | 22 +++++++++---------- ...026-03-01-agent-shell-session-selection.md | 6 ++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/blog/2026-02-01-operating-self-hosted-forgejo-via-cli-a-forgejo-cli-guide-2.md b/src/blog/2026-02-01-operating-self-hosted-forgejo-via-cli-a-forgejo-cli-guide-2.md index bdff3c7..5cceee1 100644 --- a/src/blog/2026-02-01-operating-self-hosted-forgejo-via-cli-a-forgejo-cli-guide-2.md +++ b/src/blog/2026-02-01-operating-self-hosted-forgejo-via-cli-a-forgejo-cli-guide-2.md @@ -38,7 +38,7 @@ I installed it on a Linux environment using Nix's home-manager. The Nix 25.11 pa ``` forgejo-cli is launched with the `fj` command: -```bash +```shellsession $ fj version fj v0.3.0 ``` @@ -56,20 +56,20 @@ Generate a token from Forgejo's frontend at Settings > Applications > Access tok # Logging In with a Token I stored the generated token in [gnome-keyring](https://gitlab.gnome.org/GNOME/gnome-keyring) first: -```bash +```shellsession $ echo -n "MY_FORGEJO_PAT" | secret-tool store --label="Forgejo PAT" service forgejo user username@git.example.com ``` Register the key using the `auth add-key` subcommand. Note that you must specify the host with `-H git.example.com`; otherwise, it defaults to `github.com`: -```bash +```shellsession $ echo -n "$(secret-tool lookup service forgejo user username@git.example.com)" | fj -H git.example.com auth add-key username ``` -```bash +```shellsession $ fj auth list username@git.example.com ``` -```bash +```shellsession $ fj -H git.example.com whoami currently signed in to username@git.example.com ``` @@ -81,29 +81,29 @@ The v0.3.0 `fj` provides `issue` and `pr` commands for managing issues and pull ## Issues Create an issue with `fj issue create`. Note that the `-H` flag for specifying the host must come before the subcommand: -```bash +```shellsession $ fj -H git.example.com issue create --repo [TITLE] --body ``` To search for issues in a specific repository, use `fj issue search`. The `--repo` option is required: -```bash +```shellsession $ fj issue search --repo ``` To view issue details, use `fj issue view body`. Replace `` with the issue number. You can also close issues using the `-w` option to include a comment. Interestingly, this command works correctly without requiring the repository name: -```bash +```shellsession $ fj -H git.example.com issue close -w ``` ## Pull Requests Create a pull request with `fj pr create`. This creates a pull request requesting to merge the `` branch into the `` branch: -```bash +```shellsession $ fj pr create --repo --base --head [TITLE] --body ``` List pull requests using `fj pr search`. You can filter by state using the `-s` option with either `open` or `closed`: -```bash +```shellsession $ fj pr search -r -s ``` @@ -114,7 +114,7 @@ You can access help for any command using the `--help` flag. # Logging Out Logout from a host with `fj auth logout`: -```bash +```shellsession $ fj auth list username@git.example.com $ fj auth logout git.example.com diff --git a/src/blog/2026-03-01-agent-shell-session-selection.md b/src/blog/2026-03-01-agent-shell-session-selection.md index a64412b..357ca6a 100644 --- a/src/blog/2026-03-01-agent-shell-session-selection.md +++ b/src/blog/2026-03-01-agent-shell-session-selection.md @@ -15,7 +15,7 @@ By default, starting agent-shell creates a new session. However, with the follow ## Prerequisites -```bash +```shellsession $ emacs --version GNU Emacs 30.2 Development version 636f166cfc86 on HEAD branch; build date 2025-12-14. @@ -28,7 +28,7 @@ For more information about these matters, see the file named COPYING. This article assumes the use of Copilot CLI. -```bash +```shellsession $ copilot --version GitHub Copilot CLI 0.0.420. Run 'copilot update' to check for updates. @@ -45,7 +45,7 @@ agent-shell v0.43.1 Set the value of `agent-shell-session-strategy` to `prompt`. Here is an example configuration in `init.el`: -```elisp +```emacs-lisp (use-package agent-shell :custom (agent-shell-session-strategy 'prompt)