@kenkaiiii/ggcoder 6.1.0 → 6.2.0

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.
Files changed (39) hide show
  1. package/assets/skills/gg-guide/SKILL.md +15 -14
  2. package/assets/skills/gg-guide/references/chat-motion-goals.md +43 -32
  3. package/assets/skills/gg-guide/references/checklist-and-safety.md +6 -5
  4. package/assets/skills/gg-guide/references/code-mode.md +21 -19
  5. package/assets/skills/gg-guide/references/getting-started.md +167 -71
  6. package/assets/skills/gg-guide/references/ken-and-autopilot.md +28 -24
  7. package/assets/skills/gg-guide/references/mcp-and-skills.md +23 -15
  8. package/assets/skills/gg-guide/references/models-and-sign-in.md +25 -26
  9. package/assets/skills/gg-guide/references/sessions-and-history.md +32 -18
  10. package/assets/skills/gg-guide/references/settings.md +85 -61
  11. package/assets/skills/gg-guide/references/troubleshooting-and-data.md +17 -3
  12. package/dist/app-sidecar/detached-sessions.d.ts +38 -0
  13. package/dist/app-sidecar/detached-sessions.js +71 -0
  14. package/dist/app-sidecar/detached-sessions.js.map +1 -0
  15. package/dist/app-sidecar/session-file-routes.d.ts +44 -0
  16. package/dist/app-sidecar/session-file-routes.js +175 -0
  17. package/dist/app-sidecar/session-file-routes.js.map +1 -0
  18. package/dist/app-sidecar/workspace-routes.js +15 -1
  19. package/dist/app-sidecar/workspace-routes.js.map +1 -1
  20. package/dist/app-sidecar.js +66 -31
  21. package/dist/app-sidecar.js.map +1 -1
  22. package/dist/core/agent-session.d.ts +6 -0
  23. package/dist/core/agent-session.js +17 -0
  24. package/dist/core/agent-session.js.map +1 -1
  25. package/dist/core/project-discovery.js +17 -6
  26. package/dist/core/project-discovery.js.map +1 -1
  27. package/dist/core/tasks-store.d.ts +2 -0
  28. package/dist/core/tasks-store.js +6 -0
  29. package/dist/core/tasks-store.js.map +1 -1
  30. package/dist/goals-agent/goals-agent.d.ts +1 -8
  31. package/dist/goals-agent/goals-agent.js +1 -29
  32. package/dist/goals-agent/goals-agent.js.map +1 -1
  33. package/dist/modes/acp-mode.d.ts +3 -1
  34. package/dist/modes/acp-mode.js +84 -3
  35. package/dist/modes/acp-mode.js.map +1 -1
  36. package/package.json +4 -4
  37. package/dist/app-sidecar/poll.d.ts +0 -39
  38. package/dist/app-sidecar/poll.js +0 -184
  39. package/dist/app-sidecar/poll.js.map +0 -1
@@ -1,6 +1,7 @@
1
1
  # Settings
2
2
 
3
3
  ## Contents
4
+
4
5
  - Opening Settings
5
6
  - The tray Settings dialog
6
7
  - General
@@ -16,103 +17,120 @@ Settings is where you set up GG Coder: how it looks, sounds and behaves, your pr
16
17
 
17
18
  ## Opening Settings
18
19
 
19
- - On the home screen, click the gear button labelled **Settings**. Its tooltip reads "Settings: AI providers, your projects folder, and more."
20
- - Settings fills the whole window. A row of tab icons runs along the bottom: **General**, **AI Providers**, **Remote**, **MCP**, **Steroids** and **About**. The selected tab widens to show its name, which also appears at the top of the screen.
21
- - Switch tabs by clicking them, or with the Left and Right arrow keys, Home and End.
22
- - Some pages put their status badge and main button in the top bar, next to the page name.
23
- - Click **Back** at the top left to return to the home screen. The home screen then re-checks your folder and providers.
24
- - GG Coder opens Settings for you when something is missing. Opening a workspace without a project folder shows "Set a workspace folder first." and opens General. With no AI provider connected it shows "Connect an AI provider first." and opens AI Providers.
20
+ - Click **Settings** at the bottom of the icon rail on the left of any window. On macOS and Windows the tray menu also has a **Settings** item.
21
+ - Settings fills the window. The icon rail stays on the left, and beside it the Settings list takes the place of the session sidebar: **Settings** at the top, a **Search** field (**Search settings**) that filters the list, then the pages in groups:
22
+ - **App**: **General**, **Remote**
23
+ - **Agent**: **AI Providers**, **MCP**, **Steroids**
24
+ - **GG Coder**: **About**
25
+ - The installed version sits at the bottom of the list, for example "GG Coder 0.122.0".
26
+ - Click a page to open it, or use the Up and Down arrow keys to move through the list. In the search field, Enter opens the first match.
27
+ - Each page has a title and a one-line subtitle, then one column of titled sections. Each row has its name and a short description on the left and its control on the right. There are no buttons or badges next to the page title.
28
+ - In a narrow window the list shows as a row of tabs above the page instead.
29
+ - Click **Back** (the arrow at the top of the list) to return to where you were, or use any button on the icon rail. Home then re-checks your folder and providers.
30
+ - Settings has no sidebar toggle; its list always shows.
31
+ - GG Coder opens Settings for you when something is missing. Starting a session without a project folder shows "Set a workspace folder first." and opens General. With no AI provider connected it shows "Connect an AI provider first." and opens AI Providers.
25
32
 
26
33
  ## The tray Settings dialog
27
34
 
28
35
  - On macOS and Windows, the menu-bar (tray) menu has a **Settings** item. It opens a smaller dialog titled **Settings** over the current window.
29
- - It has the same sections as the General tab. Appearance, Effects and Power apply as soon as you click them.
36
+ - It has the same settings as the General page, in the same rows: **Full Disk Access** (**Grant access…** until it's granted), **Appearance** (Light, Dark or Auto), the **Sound**, **Home animation** and **Keep awake** switches, and **Project folder** with **Choose…**. Appearance, Effects and Power apply as soon as you change them.
30
37
  - In this dialog the project folder is only saved when you click **Save**. **Cancel** closes it without saving the folder.
31
38
 
32
39
  ## General
33
40
 
34
41
  General opens first. It has no Save button: every change saves as soon as you make it.
35
42
 
36
- ### Permissions (macOS only)
37
-
38
- - Shows whether GG Coder has Full Disk Access, with a **Granted** or **Not granted** badge.
39
- - **Grant Permissions…** opens your computer's System Settings so you can turn on Full Disk Access. Once granted, the button reads **Permissions granted** and is greyed out.
40
- - GG Coder checks again each time you switch back to its window, so the badge updates on its own.
41
- - The section is hidden on systems where there is nothing to grant.
42
-
43
- ### Appearance
43
+ ### Window
44
44
 
45
- - Pick **Light**, **Dark** or **Auto**. Auto follows your computer's light or dark setting.
45
+ - **Appearance**: three small pictures, **Light**, **Dark** and **Auto**. Click one to pick it. Auto follows your computer's light or dark setting.
46
46
  - The default is Dark.
47
47
  - The change applies right away, to every GG Coder window.
48
48
 
49
49
  ### Effects
50
50
 
51
- - **Sound on** / **Sound off** turns all of the app's sound effects on or off. Sound is on by default. Turning it back on plays a click to confirm.
52
- - **Background on** / **Background off** turns the moving background on the home screen on or off. It is on by default.
51
+ - **Sound**: a switch for all of the app's sound effects: soft terminal-style ticks and short muffled tones, such as the few quick ticks and soft chime when GG finishes a turn. It is on by default. Turning it back on plays a click to confirm.
52
+ - **Home animation**: a switch for the dissolving title on Home. With it off, Home shows a still frame. It is on by default.
53
53
  - Both choices are kept on this computer and last after a restart.
54
54
 
55
55
  ### Power
56
56
 
57
- - **Keep awake** stops your computer from going to sleep while the agent is working. The screen can still turn off.
58
- - A badge next to it shows **On** or **Off**. It is on by default.
59
- - The change applies right away, including to a task already running, and is remembered.
57
+ - **Keep awake**: a switch that stops your computer from going to sleep while the agent is working. The screen can still turn off.
58
+ - It is on by default. The change applies right away, including to a task already running, and is remembered.
60
59
 
61
- ### Project folder
60
+ ### Files
62
61
 
63
- - The folder where new projects are created. The example text in the box is /Users/you/gg-projects.
64
- - Type a path and press Enter or click outside the box, or click **Browse…** to pick a folder. Either way it saves immediately and "Project folder saved." appears.
62
+ - **Project folder**: the folder where new projects are created. The example text in the box is /Users/you/gg-projects.
63
+ - Click **Choose…** to pick a folder, or type a path in the box and press Enter or click outside it. Either way it saves immediately and "Project folder saved." appears.
65
64
  - If you clear the box, nothing is saved and the folder you saved before comes back.
66
- - If you have never saved a folder, the section says "Not saved yet. Press Enter to use this folder, or Browse for another." Until you save one, opening a workspace sends you back here.
65
+ - If you have never saved a folder, the row says "Not saved yet. Press Enter to use this folder, or choose another". Until you save one, opening a workspace sends you back here.
67
66
  - Changing the folder doesn't affect your saved models, Autopilot choices, hidden projects or local endpoints.
67
+ - **Full Disk Access** (macOS only): shows **Granted** with a ✓ once GG Coder has it. Otherwise it shows a **Grant access…** button, which opens your computer's System Settings so you can turn it on. GG Coder checks again each time you switch back to its window, so the row updates on its own. The row is hidden on systems where there is nothing to grant.
68
68
 
69
69
  ## AI Providers
70
70
 
71
- - Shows every AI provider you can connect, grouped by region around an animated brain. A badge shows how many are connected, for example "0 connected".
72
- - Click a provider to connect it: sign in through your browser, or paste a key into the **Paste your API key** box and click **Connect**.
73
- - On a connected provider, **Replace** swaps in a new key or sign-in and **Disconnect** removes it. With both methods connected, the bottom button reads **Disconnect both**.
74
- - The **Local models** and **Hugging Face** cards set up models that run on your own computer.
75
- - You need at least one connected provider (or a local model) before you can open a workspace or start Remote.
71
+ - Lists every AI provider you can connect, in sections: United States, Japan, Gateways and China (and Other if there are any). Each section heading shows how many are connected, for example "1 of 3".
72
+ - Each provider is one row saying **Connected with your account**, **Connected with an API key** or **Not connected**.
73
+ - A connected row shows **Connected** with a ✓ and a **Manage** button. Other rows have a **Connect** button.
74
+ - **Connect** opens the provider's sign-in: sign in through your browser, or paste a key into the **Paste your API key** box and click **Connect**.
75
+ - In **Manage**, **Replace** swaps in a new key or sign-in and **Disconnect** removes it. With both methods connected, the bottom button reads **Disconnect both**.
76
+ - **On your machine** has two more rows: **Local models** (**Set up**) and **Hugging Face** (**Connect** or **Manage**, plus **Browse**). They set up models that run on your own computer.
77
+ - You need at least one connected provider (or a local model) before you can start a session or Remote.
76
78
  - Choosing a model and thinking level is not done here; it's in the Model panel inside a session. See the models and sign-in page for every provider and the Model panel.
77
79
 
78
80
  ## Remote
79
81
 
80
- Remote lets you message your agent on this computer from your phone, using your own Telegram bot. The setup is titled **Telegram setup**.
82
+ Remote lets you message your agent on this computer from your phone, using your own Telegram bot.
81
83
 
82
- - **Bot token**: create a bot with @BotFather in Telegram (send /newbot), then paste the token it gives you. If a token is already saved, the box shows a shortened version. Leave it blank to keep the saved token.
84
+ ### Bot
85
+
86
+ - **Bot token**: create a bot with @BotFather in Telegram (send /newbot), then paste the token it gives you. If a token is already saved, the row shows a shortened version. Leave the box blank to keep the saved token.
83
87
  - **Your Telegram user ID**: your numeric Telegram ID. Message @userinfobot in Telegram to find it. The box accepts only digits.
84
- - **Save bot** (top right) checks the token and saves your bot. On success "Telegram connected." appears; if the check fails, the error appears under the boxes.
85
- - **Start serving** starts the bot. It stays greyed out until a bot is saved ("Save your bot first"), and needs a connected AI provider. While running it shows "Serving on Telegram — message your bot."
88
+ - **Save bot** checks the token and saves your bot. On success "Telegram connected." appears; if the check fails, the error appears under the boxes.
89
+
90
+ ### Serving
91
+
92
+ - **Status** shows **Live** with a ✓ while the bot is running, and **Off** when it isn't.
93
+ - **Start serving** starts the bot. It stays greyed out until a bot is saved ("Save your bot first"), and needs a connected AI provider. Once it's running, "Serving on Telegram. Message your bot." appears.
86
94
  - **Stop serving** turns the bot off.
87
- - A badge next to the page name shows **Live** while the bot is running and **Off** when it isn't.
88
95
  - On macOS and Windows, the tray menu's Remote item reads "Remote · Turn off" while the bot is running.
89
96
 
90
97
  ## MCP
91
98
 
92
99
  MCP servers are extra tools your agent can use.
93
100
 
94
- - Choose **Global** to work with servers available in every project, or **Project** for one project. With Project, type the project's path or pick it from the list. The **Servers** list shows the servers for the scope you chose.
95
- - **Sign in** connects a server that needs you to log in. The x next to a server removes it.
96
- - **Add a server**: paste a `claude mcp add` command, for example `claude mcp add --transport http notion https://mcp.notion.com/mcp`, then press Enter or click **Add** at the top right.
101
+ ### Servers
102
+
103
+ - Lists the servers for the scope chosen under **Where** below. The section heading says **Global** or **This project**.
104
+ - Each row shows the server's name, its tool count (or **Requires login**), and its state: **Ready** with a ✓, **Needs you** with a ?, or **Failed** with a ×.
105
+ - **Sign in** appears on a server that needs you to log in. The × button at the end of a row removes that server.
106
+ - If nothing is set up yet, the list says "No MCP servers yet".
107
+
108
+ ### Add a server
109
+
110
+ - **Command**: paste a `claude mcp add` command, for example `claude mcp add --transport http notion https://mcp.notion.com/mcp`.
111
+ - **Where**: choose **Global** for every project, or **Project** for one project. With Project, a **Project** row appears: type the project's path or click **Choose…** to pick the folder.
112
+ - Click **Add server** (or press Enter in the command box).
97
113
  - Windows that are already open load a new server right away.
98
- - If nothing is set up yet, the list says "No MCP's configured".
99
114
 
100
115
  ## Steroids
101
116
 
102
117
  Steroids lets your agent read current code from real repositories on your computer before it writes code. It is free and works offline.
103
118
 
104
- - **Status** shows **Connected**, **Empty corpus**, **Not installed** or **Broken**. When connected it also shows the version, number of repos and files, and disk space used.
105
- - **Install Steroids** installs it when it isn't installed yet.
106
- - If it is installed but has no repositories, the page suggests asking the agent to "curate a Steroids corpus for this project".
107
- - **Read the README** opens the Steroids documentation.
108
- - When Steroids is not connected, a small red dot appears on the Steroids tab icon.
119
+ - **Corpus** section:
120
+ - **Status** shows **Connected** with a ✓ (with the version, number of repos and files, and disk space used), **Not installed** with an **Install Steroids** button, **Broken** with a × and the error, or **Empty corpus** with a ? when it is installed but has no repos.
121
+ - **Add repos**: ask the agent to "curate a Steroids corpus for this project".
122
+ - **How it works**: **Read the README** opens the Steroids documentation.
123
+ - When Steroids is not connected, a **?** appears next to **Steroids** in the Settings list.
109
124
 
110
125
  ## About
111
126
 
112
- - Who makes GG Coder: Ken Kai, with **Learn with Ken on Skool** and **Watch on YouTube** links.
113
- - **Desktop app releases**: a calendar with one square per day since the first release. Brighter squares mean more releases that day. Point at a day to see what changed. The day your installed version shipped is marked **Your version**.
114
- - **Read every release** opens the full list of release notes.
115
- - The license notice and a **Source code** link.
127
+ - At the top, a line from Ken types itself out. Click it to finish the line or go to the next one.
128
+ - **Ken** section: **Learn with Ken on Skool** (**Open Skool**) and **YouTube** (**Watch**).
129
+ - **Releases** section:
130
+ - Four figures: **Your version**, **Releases** (how many there have been), **CLI since** and **App since**.
131
+ - A calendar with one square per day since the first desktop app release, in steps of grey from **Less** to **More**. Brighter squares mean more releases that day. Point at a day, or move to it with the arrow keys, to read what shipped under the calendar. The day your installed version shipped is marked **Your version**.
132
+ - **Release notes**: **Read every release** opens the full list of release notes.
133
+ - **Licence** section: **GNU AGPL-3.0** (free software, no warranty) with a **Source code** link, and **Credits** for the fonts and Home's picture.
116
134
 
117
135
  ## What is not in Settings
118
136
 
@@ -124,7 +142,7 @@ Steroids lets your agent read current code from real repositories on your comput
124
142
  ## Common questions
125
143
 
126
144
  Q: Where is Settings?
127
- A: On the home screen, click the gear button labelled **Settings**. On macOS and Windows the tray menu also has a **Settings** item.
145
+ A: Click **Settings** at the bottom of the icon rail on the left of any window. On macOS and Windows the tray menu also has a **Settings** item.
128
146
 
129
147
  Q: Do I need to press Save?
130
148
  A: Not on the Settings screen; every change saves as you make it. Only the tray Settings dialog has a **Save** button, and it only saves the project folder.
@@ -133,22 +151,22 @@ Q: How do I switch to light mode?
133
151
  A: In **General**, under **Appearance**, click **Light**, or **Auto** to follow your computer. It applies to every window at once.
134
152
 
135
153
  Q: How do I turn off the sounds?
136
- A: In **General**, under **Effects**, click **Sound on** so it reads **Sound off**.
154
+ A: In **General**, under **Effects**, turn off the **Sound** switch.
137
155
 
138
- Q: How do I stop the moving home background?
139
- A: In **General**, under **Effects**, click **Background on** to turn it off.
156
+ Q: How do I stop the moving title on Home?
157
+ A: In **General**, under **Effects**, turn off the **Home animation** switch.
140
158
 
141
159
  Q: Why does my computer stay awake?
142
- A: **Keep awake** under **Power** is on by default while the agent works. Click it to turn it off; the screen can still sleep either way.
160
+ A: The **Keep awake** switch under **Power** is on by default while the agent works. Turn it off to let the computer sleep; the screen can still sleep either way.
143
161
 
144
162
  Q: Where are new projects created?
145
- A: In the folder under **Project folder** in General. Type a path and press Enter, or use **Browse…**.
163
+ A: In the folder under **Project folder** in General, under **Files**. Click **Choose…**, or type a path and press Enter.
146
164
 
147
165
  Q: It keeps saying "Set a workspace folder first."
148
- A: Open **General** and press Enter in the **Project folder** box, or browse for a folder. It saves right away.
166
+ A: Open **General** and press Enter in the **Project folder** box, or click **Choose…** to pick a folder. It saves right away.
149
167
 
150
168
  Q: Where do I add my API key?
151
- A: In the **AI Providers** tab. Click the provider, paste the key and click **Connect**.
169
+ A: In **AI Providers**. Click **Connect** on the provider's row, paste the key and click **Connect**.
152
170
 
153
171
  Q: Where do I change the model in Settings?
154
172
  A: There is no model setting in Settings. Click the model name in the bar under the message box in a session.
@@ -157,13 +175,19 @@ Q: How do I use GG Coder from my phone?
157
175
  A: In **Remote**, paste your bot token and Telegram user ID, click **Save bot**, then **Start serving**.
158
176
 
159
177
  Q: How do I add an MCP server?
160
- A: In **MCP**, paste a `claude mcp add` command into the add box, choose **Global** or **Project**, and press Enter.
178
+ A: In **MCP**, paste a `claude mcp add` command into **Command**, choose **Global** or **Project** under **Where**, and click **Add server**.
161
179
 
162
- Q: Why is there a red dot on the Steroids tab?
163
- A: Steroids isn't connected. Open the tab to install it or to see why it isn't working.
180
+ Q: Why is there a dot next to Steroids?
181
+ A: Steroids isn't connected. Open the page to install it or to see why it isn't working.
164
182
 
165
- Q: Why is the Permissions section missing?
166
- A: It only appears on macOS, where GG Coder can ask for Full Disk Access.
183
+ Q: Where is Full Disk Access?
184
+ A: In **General**, under **Files**. It only appears on macOS. Click **Grant access…** to open System Settings; once it's on the row shows **Granted**.
185
+
186
+ Q: How do I find a setting quickly?
187
+ A: Type in the **Search** field at the top of the Settings list. It filters the pages; press Enter to open the first match.
167
188
 
168
189
  Q: How do I see what changed in each release?
169
190
  A: Open **About**, point at a day in the release calendar, or click **Read every release**.
191
+
192
+ Q: Is the bot running?
193
+ A: Open **Remote** and look at **Status** under **Serving**: **Live** means it's running, **Off** means it isn't. Use **Start serving** or **Stop serving** next to it.
@@ -1,6 +1,7 @@
1
1
  # Troubleshooting and where GG Coder keeps data
2
2
 
3
3
  ## Contents
4
+
4
5
  - What lives in `~/.gg/`
5
6
  - Files inside a project
6
7
  - Which log to read
@@ -14,6 +15,7 @@ GG Coder keeps its data in one folder in the user's home directory, `~/.gg/`. Th
14
15
  ## What lives in `~/.gg/`
15
16
 
16
17
  Settings and sign-ins:
18
+
17
19
  - `~/.gg/settings.json`: agent settings such as the chosen model, thinking level, keep-awake and the trust choices for project MCP servers. Shared with the CLI.
18
20
  - `~/.gg/gg-app.json`: desktop-app settings, such as the projects folder and per-project app options like autopilot.
19
21
  - `~/.gg/gg-app-workspace.json`: a record of which windows were open, with their project, chat and position. The app uses it to reopen windows after a restart.
@@ -23,11 +25,13 @@ Settings and sign-ins:
23
25
  - `~/.gg/telegram.json`: Telegram bot settings, including the bot token. Never share it.
24
26
 
25
27
  MCP:
28
+
26
29
  - `~/.gg/mcp.json`: global MCP servers, used in every project.
27
30
  - `~/.gg/mcp-auth.json`: sign-ins for MCP servers. This is a credential file. Never share it.
28
31
  - `~/.gg/mcp-catalog.json`: a cached list of MCP tools. It is safe to delete and gets rebuilt.
29
32
 
30
33
  Work and history:
34
+
31
35
  - `~/.gg/sessions`: saved chats (session transcripts). Deleting them removes chat history. Old sessions are pruned at startup based on a retention setting.
32
36
  - `~/.gg/subagent-sessions`: transcripts of helper agents.
33
37
  - `~/.gg/goals`: one folder per Goal.
@@ -38,6 +42,7 @@ Work and history:
38
42
  - `~/.gg/progress.json` and `~/.gg/trophies.json`: progress and earned trophies.
39
43
 
40
44
  Logs and housekeeping:
45
+
41
46
  - `~/.gg/gg-app-sidecar.log`: the desktop app's agent log. Read this first for app problems.
42
47
  - `~/.gg/debug.log`: the CLI's log. The desktop app does not write to it.
43
48
  - `~/.gg/gg-app-sidecars`: a list of the app's running agent processes. Don't edit it while the app is open.
@@ -48,6 +53,7 @@ Never paste or upload: `~/.gg/auth.json`, `~/.gg/mcp-auth.json`, `~/.gg/telegram
48
53
  ## Files inside a project
49
54
 
50
55
  Each project can have its own `.gg/` folder:
56
+
51
57
  - `.gg/mcp.json`: MCP servers for this project only.
52
58
  - `.gg/skills`: skills for this project. Each skill is a folder with a `SKILL.md`.
53
59
  - `.gg/commands`: custom slash commands, one `.md` file each. They appear in the `/` menu. A Goal's attached repos and folders added with **Add folder** contribute their commands too.
@@ -63,12 +69,14 @@ Each project can have its own `.gg/` folder:
63
69
  ## Common problems
64
70
 
65
71
  Not signed in, or a sign-in stopped working:
72
+
66
73
  - When a chat starts with no provider connected, the app shows "Connect an AI provider first." Connect a provider from the providers screen with **Connect** or **Sign in**.
67
74
  - If an old sign-in has been retired, the providers screen shows a notice with **Reconnect** and **Dismiss**. **Reconnect** opens that provider's login. **Dismiss** removes only the retired sign-in.
68
75
  - If the providers list fails to load, the screen shows "Couldn't read your AI providers." with **Try again**.
69
76
  - Sign-ins are shared, so connecting or disconnecting in one window updates every window.
70
77
 
71
78
  Model errors in a chat:
79
+
72
80
  - An error appears in the chat as a short headline, a line of guidance, and a **Details** button. **Details** shows the provider's original message, the provider name, the HTTP status, the request ID and the time of the report.
73
81
  - Errors fall into these kinds: usage limit, billing, quota, rate limit, model access, auth, network, capability, context, update, provider or unknown.
74
82
  - For usage-limit, model-access, capability and update errors, a model picker appears next to the notice so the user can switch models.
@@ -77,6 +85,7 @@ Model errors in a chat:
77
85
  - If a subscription runs out and the provider also has an API key saved, the provider screen says requests are using the API key until the subscription resets.
78
86
 
79
87
  Common error headlines and what to do:
88
+
80
89
  - "<provider> usage limit reached": wait for the reset shown in **Details**, or switch to another provider or model with the picker next to the notice. If the provider also has an API key saved, GG uses the key until the subscription resets.
81
90
  - "<provider> is limiting requests": wait a moment, then try again.
82
91
  - "<provider> sign-in needs attention": reconnect the account in the AI Providers settings.
@@ -88,25 +97,30 @@ Common error headlines and what to do:
88
97
  Small pop-up messages (toasts) appear at the edge of the window for things like saved settings or failed actions. Normal ones fade after a few seconds. Error toasts stay until you close them with the x (**Dismiss**).
89
98
 
90
99
  A window stuck loading or showing an error:
100
+
91
101
  - The window waits for the background agent to start. If the agent doesn't start in time, or keeps crashing on startup, the window shows that reason. A crash message names the cause, for example a permissions error on `~/.gg/settings.json`.
92
102
  - If the window itself crashes, it shows **This window hit a problem** with an **Error details** section and a **Reload window** button. Chats are saved, so reloading continues where the user left off.
93
103
  - If the problem continues, check `~/.gg/gg-app-sidecar.log`.
94
104
 
95
105
  MCP server not working (Settings, MCP):
96
- - A green tick with a tool count means the server is connected.
97
- - A lock with **Requires login** means the server needs a sign-in. Click **Sign in**.
98
- - A red cross shows the connection error under the server's row. Errors that start with "blocked" are safety blocks. Tools hidden by the safety guard are listed under the row.
106
+
107
+ - **Ready** with a ✓ and a tool count means the server is connected.
108
+ - **Needs you** with **Requires login** means the server needs a sign-in. Click **Sign in**.
109
+ - **Failed** with a × shows the connection error under the server's row. Errors that start with "blocked" are safety blocks. Tools hidden by the safety guard are listed under the row.
99
110
  - A server from a project's `.gg/mcp.json` stays disconnected until that project is trusted, because the file can run commands chosen by the repo. Adding or re-adding the server for that project in the MCP screen trusts that project.
100
111
  - If the list says "Couldn't reach the agent to list servers.", use **Try again**.
101
112
 
102
113
  `!` commands ask for confirmation:
114
+
103
115
  - In a project that hasn't been trusted, a shell command typed with `!` shows **Run this command?** along with the command and the folder it will run in. The choices are **Run once**, **Always allow in this project** and **Cancel**. Enter runs the command and Esc cancels it.
104
116
 
105
117
  App updates:
118
+
106
119
  - An update bar offers the new version. Installing it downloads the update, then restarts the app.
107
120
  - If the install fails, the bar shows **Update failed** with **Retry** and **Download manually**. **Download manually** opens the latest release on GitHub.
108
121
 
109
122
  Quit and relaunch:
123
+
110
124
  - The app records each open window's project, chat and position when the user picks a project, closes a window or quits. On the next launch, including the restart after an update, it reopens those windows where they were.
111
125
 
112
126
  ## Reporting a bug
@@ -0,0 +1,38 @@
1
+ import type { ChatAgentId } from "../chat-agents/index.js";
2
+ import type { WorkspaceMode } from "./session-types.js";
3
+ /** A session still working after its window switched away (GET /sessions/background). */
4
+ export interface BackgroundSession {
5
+ sessionId: string;
6
+ sessionPath: string | null;
7
+ cwd: string;
8
+ mode: WorkspaceMode;
9
+ chatAgent: ChatAgentId;
10
+ }
11
+ /** What the registry needs from a live session. */
12
+ export interface DetachableSession {
13
+ id: string;
14
+ cwd: string;
15
+ mode: WorkspaceMode;
16
+ chatAgent: ChatAgentId;
17
+ sessionPath: () => string | undefined;
18
+ isBusy: () => boolean;
19
+ }
20
+ /**
21
+ * Sessions a window switched away from mid-run. They keep working with no
22
+ * window, every window's sidebar lists them as working, opening one again
23
+ * picks it back up, and each closes once it goes idle (`sweep`).
24
+ */
25
+ export declare function createDetachedSessions(deps: {
26
+ get: (id: string) => DetachableSession | undefined;
27
+ close: (id: string) => void;
28
+ announce: (sessions: BackgroundSession[]) => void;
29
+ }): {
30
+ list: () => BackgroundSession[];
31
+ readonly size: number;
32
+ /** Keep a working session alive with no window. False: it's idle, close it. */
33
+ detach(id: string): boolean;
34
+ /** A window opens this conversation again: hand back the live session. */
35
+ reattach(sessionPath: string, mode: WorkspaceMode, chatAgent: ChatAgentId): string | null;
36
+ /** Close every detached session that has finished. */
37
+ sweep(): void;
38
+ };
@@ -0,0 +1,71 @@
1
+ import path from "node:path";
2
+ /**
3
+ * Sessions a window switched away from mid-run. They keep working with no
4
+ * window, every window's sidebar lists them as working, opening one again
5
+ * picks it back up, and each closes once it goes idle (`sweep`).
6
+ */
7
+ export function createDetachedSessions(deps) {
8
+ const detached = new Set();
9
+ const list = () => [...detached].flatMap((id) => {
10
+ const s = deps.get(id);
11
+ return s
12
+ ? [
13
+ {
14
+ sessionId: s.id,
15
+ sessionPath: s.sessionPath() ?? null,
16
+ cwd: s.cwd,
17
+ mode: s.mode,
18
+ chatAgent: s.chatAgent,
19
+ },
20
+ ]
21
+ : [];
22
+ });
23
+ const announce = () => deps.announce(list());
24
+ return {
25
+ list,
26
+ get size() {
27
+ return detached.size;
28
+ },
29
+ /** Keep a working session alive with no window. False: it's idle, close it. */
30
+ detach(id) {
31
+ const s = deps.get(id);
32
+ if (!s || !s.isBusy())
33
+ return false;
34
+ detached.add(id);
35
+ announce();
36
+ return true;
37
+ },
38
+ /** A window opens this conversation again: hand back the live session. */
39
+ reattach(sessionPath, mode, chatAgent) {
40
+ const want = path.resolve(sessionPath);
41
+ for (const id of detached) {
42
+ const s = deps.get(id);
43
+ const own = s?.sessionPath();
44
+ if (!s || !own || path.resolve(own) !== want)
45
+ continue;
46
+ if (s.mode !== mode || (mode === "chat" && s.chatAgent !== chatAgent))
47
+ continue;
48
+ detached.delete(id);
49
+ announce();
50
+ return id;
51
+ }
52
+ return null;
53
+ },
54
+ /** Close every detached session that has finished. */
55
+ sweep() {
56
+ let changed = false;
57
+ for (const id of [...detached]) {
58
+ const s = deps.get(id);
59
+ if (s?.isBusy())
60
+ continue;
61
+ detached.delete(id);
62
+ changed = true;
63
+ if (s)
64
+ deps.close(id);
65
+ }
66
+ if (changed)
67
+ announce();
68
+ },
69
+ };
70
+ }
71
+ //# sourceMappingURL=detached-sessions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detached-sessions.js","sourceRoot":"","sources":["../../src/app-sidecar/detached-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAuB7B;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAItC;IACC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IACnC,MAAM,IAAI,GAAG,GAAwB,EAAE,CACrC,CAAC,GAAG,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;QAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACvB,OAAO,CAAC;YACN,CAAC,CAAC;gBACE;oBACE,SAAS,EAAE,CAAC,CAAC,EAAE;oBACf,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,IAAI,IAAI;oBACpC,GAAG,EAAE,CAAC,CAAC,GAAG;oBACV,IAAI,EAAE,CAAC,CAAC,IAAI;oBACZ,SAAS,EAAE,CAAC,CAAC,SAAS;iBACvB;aACF;YACH,CAAC,CAAC,EAAE,CAAC;IACT,CAAC,CAAC,CAAC;IACL,MAAM,QAAQ,GAAG,GAAS,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACnD,OAAO;QACL,IAAI;QACJ,IAAI,IAAI;YACN,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;QACD,+EAA+E;QAC/E,MAAM,CAAC,EAAU;YACf,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACvB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE;gBAAE,OAAO,KAAK,CAAC;YACpC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACjB,QAAQ,EAAE,CAAC;YACX,OAAO,IAAI,CAAC;QACd,CAAC;QACD,0EAA0E;QAC1E,QAAQ,CAAC,WAAmB,EAAE,IAAmB,EAAE,SAAsB;YACvE,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YACvC,KAAK,MAAM,EAAE,IAAI,QAAQ,EAAE,CAAC;gBAC1B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBACvB,MAAM,GAAG,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC;gBAC7B,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI;oBAAE,SAAS;gBACvD,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC;oBAAE,SAAS;gBAChF,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBACpB,QAAQ,EAAE,CAAC;gBACX,OAAO,EAAE,CAAC;YACZ,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,sDAAsD;QACtD,KAAK;YACH,IAAI,OAAO,GAAG,KAAK,CAAC;YACpB,KAAK,MAAM,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC;gBAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBACvB,IAAI,CAAC,EAAE,MAAM,EAAE;oBAAE,SAAS;gBAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBACpB,OAAO,GAAG,IAAI,CAAC;gBACf,IAAI,CAAC;oBAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACxB,CAAC;YACD,IAAI,OAAO;gBAAE,QAAQ,EAAE,CAAC;QAC1B,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type http from "node:http";
2
+ import { type LabelEntry } from "../core/session-manager.js";
3
+ /** The longest title a rename keeps, the same cap the session lists apply. */
4
+ export declare const SESSION_TITLE_MAX = 80;
5
+ /** A session open in a window right now. */
6
+ export interface LiveSessionFile {
7
+ readonly path: string | undefined;
8
+ /** Retitle it through the live session, so its own writes keep the name. */
9
+ readonly rename: (title: string) => Promise<void>;
10
+ }
11
+ export interface SessionFileContext {
12
+ /** `~/.gg`: every session store lives under it, and nothing outside is touched. */
13
+ readonly agentDir: string;
14
+ readonly liveSessions: () => readonly LiveSessionFile[];
15
+ }
16
+ interface Identity {
17
+ readonly id: string;
18
+ readonly conversationId: string;
19
+ }
20
+ /**
21
+ * A session file the app may change: inside `~/.gg` (after resolving links),
22
+ * named like a session, and starting with a session header. Anything else is
23
+ * refused, so a request can never reach another file.
24
+ */
25
+ export declare function checkedSessionFile(raw: unknown, agentDir: string): Promise<{
26
+ file: string;
27
+ identity: Identity;
28
+ } | null>;
29
+ /**
30
+ * Move a conversation's files (every checkpoint, its archive and its saved
31
+ * images) into `~/.gg/trash/sessions/<when>-<id>/`, so a delete can be undone
32
+ * by moving them back. Returns the folder they went to.
33
+ */
34
+ export declare function trashConversation(file: string, identity: Identity, agentDir: string): Promise<string>;
35
+ /** Collapse a typed title to one trimmed line within the cap; null when empty. */
36
+ export declare function cleanTitle(raw: unknown): string | null;
37
+ export declare function labelEntry(title: string): LabelEntry;
38
+ /**
39
+ * Daemon-level routes for a listed session's file, open or not:
40
+ * `POST /sessions/rename` {path, title} and `POST /sessions/trash` {path}.
41
+ * Trash refuses a conversation that is open in a window.
42
+ */
43
+ export declare function handleSessionFileRoutes(req: http.IncomingMessage, res: http.ServerResponse, url: string, method: string, ctx: SessionFileContext): boolean;
44
+ export {};