Commit Graph
18 Commits
Author SHA1 Message Date
Slava Iumin ea1ec1b595 feat(sessions): add Reload action to refresh session from disk
Sessiond caches the in-memory SessionManager and never re-reads the
session file. When the same session is also being edited by another
process (e.g. the pi CLI), new entries on disk are invisible to the
web UI \u2014 the tail of the conversation gets cut.

Add a manual Reload action in the session three-dot menu:

- Server: PiSessionService.reload(sessionId) closes the active
  session and re-opens it from disk, then publishes a fresh status.
  Exposed as POST /api/.../sessions/:sessionId/reload.
- Client: api.reloadSession, SessionController.reloadSession which
  discards the cached transcript and re-runs selectSession so the
  history page is re-fetched.
- ChatTranscriptStore gains discard(sessionId) and the history
  cache adapter gains optional remove(sessionId).
- SessionList shows a Reload entry for non-archived, non-cached
  sessions; plumbed through AppNavigationPanel and PiWebApp.

Note: pi-web-sessiond.service must be restarted manually after this
change since the session daemon code path is affected.
2026-06-14 14:11:34 +02:00
Federico Jaramillo Martinez ca30c970a7 refactor: source thinking levels from pi and make the gauge dynamic
Depend on @earendil-works/pi-agent-core so the ThinkingLevel union has a single source of truth (re-exported via shared/thinkingLevels). Wire/data fields use string and the parser is lenient, so an unknown level from a newer pi runtime is still listed, selectable, and rendered gracefully instead of throwing. The composer gauge now derives its bar count from the levels available for the current model and fills by rank. Adds compile-time drift guards (satisfies + Exclude check) and unit tests so a changed pi level set fails fast in development.
2026-06-14 13:47:44 +02:00
Federico Jaramillo Martinez d17050e144 feat: add image attachments to the chat composer
Support pasting (Ctrl/Cmd+V), drag-and-drop, and an Attach button to add
PNG/JPEG/GIF/WebP images to a message, with thumbnail previews and
multi-image support.

Attachments are delivered to the session using pi's native ImageContent
format and are run through pi's own resizeImage so they match pi's inline
image limits exactly. Image content now renders inline in the transcript.

A per-message delivery toggle also lets users save attachments into the
workspace `.pi-web/paste` folder and reference them so the agent reads
them with its own tools.

The accepted HTTP upload size is configurable via PI_WEB_MAX_UPLOAD_BYTES
or the maxUploadBytes config value (default 64 MB).

Closes #13
2026-06-13 13:49:39 +02:00
Federico Jaramillo Martinez c0d12222a2 fix: list and open sessions across project directories
Sessions outside the server's launch directory were invisible and returned
404 on open, leaving the model picker empty. List without the SDK's
process-cwd filter and normalize working directories at the API boundary and
when reading stored session data, tolerating separator/normalization
differences (including Windows backslash vs forward slash). Requires Pi
coding agent SDK 0.78.0 or newer.
2026-06-13 11:40:47 +02:00
Federico Jaramillo Martinez b99143f757 fix: preserve legacy session route lookups 2026-06-10 22:42:55 +02:00
Federico Jaramillo Martinez 71510444c4 Merge remote-tracking branch 'origin/main' into investigate/issue-12-session-dir
# Conflicts:
#	src/client/src/api.ts
#	src/client/src/api/clients.ts
#	src/client/src/api/federatedRouteContract.test.ts
#	src/server/sessions/piSessionService.ts
#	src/server/sessions/sessionRoutes.ts
2026-06-10 20:43:10 +02:00
Federico Jaramillo Martinez 06052ea5ec fix: respect Pi session directories by cwd 2026-06-10 20:26:51 +02:00
Federico Jaramillo Martinez a3b5b722c9 feat: add safe session bulk cleanup actions 2026-06-08 17:20:00 +02:00
Federico Jaramillo Martinez 82ba2e0490 fix: validate prompt API payloads
Fixes #11
2026-06-05 11:09:15 +02:00
Federico Jaramillo Martinez 428f7bb8c2 feat: archive session descendants 2026-05-23 00:05:03 +02:00
Federico Jaramillo Martinez 80cf879e0f Add realtime terminal tab badges 2026-05-11 10:45:56 +02:00
Federico Jaramillo Martinez 6a201cab02 Add model and thinking controls 2026-05-10 20:53:30 +02:00
Federico Jaramillo Martinez 39ea4bfc15 Show session lineage and support detaching forks 2026-05-10 00:28:08 +02:00
Federico Jaramillo Martinez 402d5b17aa Add session archiving 2026-05-07 21:06:11 +02:00
Federico Jaramillo Martinez 398fe3153d Add queue and steer prompt actions 2026-05-07 15:55:36 +02:00
Federico Jaramillo Martinez eb59f1eb00 Add paged chat history loading 2026-05-07 15:46:08 +02:00
Federico Jaramillo Martinez 1bc7774ced Add shell execution from chat 2026-05-07 14:11:20 +02:00
Federico Jaramillo Martinez 2ffff85313 Split session daemon from web server 2026-05-07 13:12:48 +02:00