Commit Graph
100 Commits
Author SHA1 Message Date
Federico Jaramillo Martinez ad74ea4da7 refactor: generate session names via agent.streamFn instead of pi-ai compat
Rewrite sessionNameGenerator.ts to consume a StreamFn-shaped dependency
(sourced from PiAgentSession.agent.streamFn, wired in leg B) instead of
ModelRegistry plus a dynamic @earendil-works/pi-ai/compat import.

streamFn resolves auth/headers/retry internally, so the explicit
modelRegistry.getApiKeyAndHeaders(model) call and apiKey/headers stream
options are no longer needed.

Deletes now-dead compat-loading machinery: getPiAiProviderRegistryModule,
loadPiAiProviderRegistryModule, importOptionalPiAiModule,
isModuleUnavailableError, hasGetApiProvider, PI_AI_COMPAT_MODULE,
ModuleImporter, SessionNameApiProvider, PiAiProviderRegistryModule, and
the module-level provider registry cache.

Updates the maybeGenerateSessionName call site in piSessionService.ts to
pass session.agent.streamFn instead of this.modelRegistry, and updates
both test files: sessionNameGenerator.test.ts gains coverage for the new
streamFn-driven generateShortSessionName signature (success and error
paths), and piSessionService.test.ts gains an end-to-end test proving a
first prompt generates a session name through the wired agent.streamFn
fake.

sessionNameGenerator.ts no longer imports @earendil-works/pi-ai/compat
or references getApiProvider anywhere.
2026-07-02 11:42:30 +02:00
Federico Jaramillo Martinez 6f59a4243e refactor: expose session streamFn on PiAgentSession
Add a narrow `agent: { streamFn: StreamFn }` field to the PiAgentSession
interface, sourced structurally from the real AgentSession.agent (Agent,
from the stable @earendil-works/pi-agent-core package). This is the
resolved-auth/headers/retry "call this model" function pi's own
compaction/branch-summarization code uses internally, and will let
sessionNameGenerator.ts drop its dependency on the deprecated pi-ai
/compat provider registry in a follow-up leg.

No adapter object was needed: AgentSession's real .agent field already
structurally satisfies the new narrow shape, so defaultCreateAgentRuntime
needed no changes.

Adds a unit test proving the field is wired end-to-end via the injected
runtime creator. sessionNameGenerator.ts itself is untouched (leg C).
2026-07-02 11:28:18 +02:00
Federico Jaramillo Martinez e63665549a chore: bump pi packages to ^0.80.3
Raises the minimum supported Pi version from 0.78 to 0.80. Required
for the upcoming removal of pi-web's dependency on pi-ai's deprecated
compat entrypoint (@earendil-works/pi-ai/compat).
2026-07-02 10:59:58 +02:00
Federico Jaramillo Martinez 377b5a28b6 docs: align package management website docs 2026-07-01 22:39:47 +02:00
Federico Jaramillo Martinez e7d418fd2b fix: serialize pi package mutations 2026-07-01 22:31:37 +02:00
Federico Jaramillo Martinez 95a0ad7509 fix: guide package settings by runtime capability 2026-07-01 22:24:06 +02:00
Federico Jaramillo Martinez 332db5faeb feat: expose package management capability 2026-07-01 22:13:02 +02:00
Federico Jaramillo Martinez 0a1b7f9699 fix: decouple settings package loading 2026-07-01 22:05:48 +02:00
Federico Jaramillo Martinez 3df4041bd7 feat: manage Pi packages on selected machines 2026-07-01 21:54:18 +02:00
Federico Jaramillo Martinez 889672ff53 feat: add session runtime reload command 2026-07-01 19:32:52 +02:00
Federico Jaramillo Martinez 8ade238228 feat: add Pi package management settings 2026-07-01 15:34:34 +02:00
Federico Jaramillo Martinez 3f36394c17 fix: wait for git file suggestion probes before fallback 2026-07-01 09:39:59 +02:00
Federico Jaramillo Martinez d165d69f73 feat: add bulk session mutations 2026-06-29 13:34:03 +02:00
Federico Jaramillo Martinez a87479815a fix: inherit dispatcher model for spawned sessions 2026-06-28 16:46:37 +02:00
Federico Jaramillo Martinez 7063c2c3b1 fix: prevent iOS input zoom 2026-06-28 16:11:18 +02:00
Federico Jaramillo Martinez 2009e6a883 fix: keep chat prompt input stable during streaming
Coalesce session status/activity updates into one render per animation
frame instead of one per token, ignore prompt-editor status changes that
do not affect what it displays, and stop per-keystroke draft state from
re-rendering the surrounding template. This prevents streaming-driven
re-renders from interrupting in-progress touch gestures such as the iOS
long-press paste/edit callout.
2026-06-27 08:12:01 +02:00
Federico Jaramillo Martinez 041423a03b chore(release): v1.202606.7 2026-06-26 18:20:39 +02:00
Federico Jaramillo Martinez 3f1f412147 Merge pull request #37 from jmfederico/feat/manual-session-cleanup
Add manual session cleanup
2026-06-26 16:16:34 +02:00
Federico Jaramillo Martinez cb13af4b88 feat: add manual session cleanup 2026-06-26 15:57:12 +02:00
Federico Jaramillo Martinez 904e25ac1a chore: update package lock bin path 2026-06-26 00:23:22 +02:00
Federico Jaramillo Martinez 3f903adcc7 chore: normalize package lock metadata 2026-06-26 00:20:17 +02:00
Federico Jaramillo Martinez a43c782043 feat: add configurable prompt Enter behavior 2026-06-25 23:34:41 +02:00
Federico Jaramillo Martinez fd386b2d6b feat: add prompt enter behavior setting 2026-06-25 22:55:09 +02:00
Federico Jaramillo Martinez b17faeb236 chore: add changeset for BiDi chat text 2026-06-25 22:48:30 +02:00
Federico Jaramillo Martinez 7e812aa7f5 feat: support general chat file attachments 2026-06-25 21:32:07 +02:00
Federico Jaramillo Martinez 790b36f0ea docs: improve screenshot gallery 2026-06-25 15:50:45 +02:00
Federico Jaramillo Martinez a4ad23545a docs: refresh README overview 2026-06-25 15:39:44 +02:00
Federico Jaramillo Martinez cd5843e8e5 chore: update package lock 2026-06-25 15:20:42 +02:00
Federico Jaramillo Martinez e46d9ecbf8 feat: add safe manual workspace uploads 2026-06-25 15:16:44 +02:00
Federico Jaramillo Martinez f0b779b062 Merge pull request #32 from gilbertwong96/fix/fish-doctor-version-check
fix: run doctor version checks under fish
2026-06-25 14:47:34 +02:00
Federico Jaramillo Martinez 5269a7a7d7 fix: support symlinked CLI entrypoint guard 2026-06-25 14:41:58 +02:00
Federico Jaramillo Martinez fb9d444743 docs(relay): add context-contained status baton 2026-06-25 11:30:49 +02:00
Federico Jaramillo Martinez 56c1c1714e fix: treat missing subsession files as unavailable 2026-06-25 11:08:26 +02:00
Federico Jaramillo Martinez 729635d246 Merge pull request #33 from jmfederico/feat/git-inline-diff
feat: add inline Git diff highlights
2026-06-25 11:01:45 +02:00
Federico Jaramillo Martinez b14205e523 feat: add inline Git diff highlights 2026-06-25 10:57:28 +02:00
Federico Jaramillo Martinez b0b497d493 fix: require exact active subsession files 2026-06-25 09:47:41 +02:00
Federico Jaramillo Martinez 5550c60950 fix: enforce exact subsession recovery links 2026-06-25 09:27:10 +02:00
Federico Jaramillo Martinez 417b04a23f fix: harden subsession recovery validation 2026-06-25 00:30:16 +02:00
Federico Jaramillo Martinez a99696bd09 fix: persist tracked subsession links 2026-06-25 00:20:19 +02:00
Federico Jaramillo Martinez 9980027cee feat: expose prompt helper to workspace panels 2026-06-24 23:59:39 +02:00
Federico Jaramillo Martinez 3134421652 chore(release): v1.202606.6 2026-06-24 09:17:26 +02:00
Federico Jaramillo Martinez c479a0d54d fix: support pi-ai provider compat entrypoint 2026-06-24 09:15:32 +02:00
Federico Jaramillo Martinez a0dd9e1cd7 Merge branch 'main' into cleanup/plugin-api-scope 2026-06-24 08:49:49 +02:00
Federico Jaramillo Martinez bf36df24fd chore(release): v1.202606.5 2026-06-23 21:37:02 +02:00
Federico Jaramillo Martinez 2bb6e48a8b fix: normalize Windows path suggestions 2026-06-23 20:03:44 +02:00
Federico Jaramillo Martinez c2e2a29847 docs: add PI WEB configuration reference 2026-06-23 19:58:36 +02:00
Federico Jaramillo Martinez 6933d3aa88 fix: guard stale mobile navigation focus 2026-06-23 15:01:05 +02:00
Federico Jaramillo Martinez 4f4c6fa794 fix: proxy remote session reloads 2026-06-23 14:44:24 +02:00
Federico Jaramillo Martinez 8ceadb2a62 docs: replace demo animation with screenshots 2026-06-23 14:12:09 +02:00
Federico Jaramillo Martinez 9cc20d65fb feat: add external path access allowlist 2026-06-23 12:30:30 +02:00
Federico Jaramillo Martinez 997b821717 feat: add check_subsession and an exploratory read_subsession transcript reader
Split subsession inspection into two tools: check_subsession gives a quick
glance (status + latest assistant output), while read_subsession reads through
a child's transcript with role/content filters, full-content substring search
(including tool-call args), optional per-value maxChars truncation that flags
clipped parts, includeToolArgs, and pagination.

Filtering and search run on full untruncated content; truncation is an explicit,
caller-owned final projection (no default) so a narrow read never silently hides
a match. Empty page-windows are distinguished from zero-match results.
2026-06-19 23:48:12 +02:00
Federico Jaramillo Martinez 62c2234b85 fix: avoid duplicate skill loading cards 2026-06-19 23:44:58 +02:00
Federico Jaramillo Martinez 1e8cfe9073 chore(deps): refresh dependencies to latest in-range versions
Ran npm update to refresh the lockfile to the latest versions allowed by
the existing package.json ranges; no declared ranges changed.

Notable bumps:
- @earendil-works/pi-coding-agent 0.79.1 -> 0.79.8
- @earendil-works/pi-agent-core 0.79.3 -> 0.79.8
- @earendil-works/pi-ai 0.79.3 -> 0.79.8
- eslint 10.3.0 -> 10.5.0, typescript-eslint 8.59.2 -> 8.61.1
- vitest 4.1.5 -> 4.1.9, tsx 4.21.0 -> 4.22.4, vite 7.3.3 -> 7.3.5, ws 8.20.1 -> 8.21.0

Out-of-range majors left for a deliberate upgrade. npm audit --omit=dev: 0 vulnerabilities.
2026-06-19 12:59:26 +02:00
Federico Jaramillo Martinez 27bc924d4c fix: persist subsessions setting 2026-06-18 22:17:56 +02:00
Federico Jaramillo Martinez d93110135b fix: dead-key/IME input in terminal (e.g. Swedish ~) 2026-06-18 12:00:03 +02:00
Federico Jaramillo Martinez ab46d7addc feat: add relay skill and distributable skills folder
Add the Relay method skill (execute a long plan as a chain of independent
sessions handing off via spawn_session) under a top-level skills/ folder that
follows the open agent-skills convention, installable with the skills CLI.

Also clarify the changeset-changelog skill: no changeset is needed for changes
outside the npm release allowlist (package.json files), such as repo-only
agent skills under .agents/ and skills/.
2026-06-17 12:17:11 +02:00
Federico Jaramillo Martinez 355ebe8cf8 feat(sessions): add tracked subsessions behind a beta flag
Add spawn_subsession / list_subsessions / read_subsession tools that let an
agent start child sessions it stays attached to: the child records its parent
in the session tree, the parent is notified (as a system-authored custom
message that wakes an idle parent and queues behind in-flight work) when the
child stops working, and the parent can inspect children's status and result.

Gated behind a beta flag, off by default, mirroring spawnSessions: enable via
PI_WEB_SUBSESSIONS, the subsessions config key, or the Settings toggle. Also
requires spawnSessions.

Also fix the release skill so the version step resyncs package-lock.json
(npm install --package-lock-only) and the commit step refuses a release where
package.json and package-lock.json versions disagree.
2026-06-17 12:13:23 +02:00
Federico Jaramillo Martinez ef454f2b65 chore: sync package-lock.json to 1.202606.4
The v1.202606.4 release bumped package.json but left package-lock.json at
1.202606.3, surfacing as a phantom diff after npm install. Sync it.
2026-06-17 12:12:37 +02:00
Federico Jaramillo Martinez ebe65b7565 chore(release): v1.202606.4 2026-06-17 01:11:12 +02:00
Federico Jaramillo Martinez 82db7caeac docs: update changeset to drop removed message accent stripe 2026-06-17 01:04:05 +02:00
Federico Jaramillo Martinez 32d11de38c Rename attachment folder from .pi-web/paste to .pi-web/attachments
Attachments can be pasted, dropped, or uploaded, so 'paste' was too
narrow. Rename the default folder and filename prefix accordingly and
update the changeset reference.
2026-06-17 01:02:33 +02:00
Federico Jaramillo Martinez 81dba2abc9 fix: remove 3px left border on chat bubbles 2026-06-17 00:57:17 +02:00
Federico Jaramillo Martinez 3930505450 Fix stuck "Catching up…" badge after session goes idle
The stream catch-up mode was represented by two fields that could drift:
the private catchupStreamSessionId guard (which suppresses live transcript
events while the in-flight message prefix is missing) and the public
isReceivingPartialStream flag (which drives the badge). The socket reconnect
path (refreshSelectedSession) set the flag from status without updating the
guard, so a later idle status.update was skipped by the guard check and the
badge never cleared.

Route every mutation of the mode through a single setStreamCatchup helper so
the guard and badge can't disagree, and clear the mode on any non-streaming
status for the selected session.
2026-06-17 00:43:53 +02:00
Federico Jaramillo Martinez e77ab98361 fix(sessions): stop duplicating user message for slash commands
A slash command sent as the first (or any idle) message showed the raw
command text twice until reload: once from the client's optimistic insert
and once from the server's message.append echo, neither of which converges
with the agent's canonical expanded message (e.g. a /skill:* block).

Make commands obey the same source-of-truth contract as prompts:
- client no longer inserts the raw command text optimistically; it shows
  the existing per-session sending indicator instead
- forwarded runtime/skill commands return a bare done result rather than a
  synthetic "Accepted ..." line
- server suppresses the raw message.append echo for command-forwarded
  prompts (threaded through the compaction queue too)

Result: pre-reload state matches reload, with no transient duplicate.
2026-06-17 00:02:04 +02:00
Federico Jaramillo Martinez dd23b3e054 fix(sessions): dedupe started session when created broadcast races
The session.created global event (added with spawn_session) could arrive
in the initiating tab before the start request's HTTP response resolved.
applyCreatedSession inserted a plain session row (archive/reload actions)
and then startSession unconditionally prepended the cached version (delete
action), leaving two badges with the same id.

Make the optimistic insert idempotent by filtering out any existing entry
with the same id before prepending the cached session, so the locally
cached session always wins regardless of event ordering.
2026-06-16 23:40:47 +02:00
Federico Jaramillo Martinez 1c6bc96110 Show Tasks tab badge only for unavailable config
Drop the task-count badge so the Tasks tab no longer draws attention
during normal use. Keep the '!' badge for when the tasks config exists
but cannot be loaded, which is the only state that warrants attention.
2026-06-16 22:32:57 +02:00
Federico Jaramillo Martinez 95c151233a feat: let agents start new sessions via spawn_session tool
Add a project-scoped spawn_session tool so agents can dispatch new,
independent sessions (ralph loops, long-plan chaining). Spawned sessions
are constrained to a workspace/worktree of the same registered project,
appear in the session list immediately via a new session.created event,
and the capability is on by default with a Settings -> Session daemon
toggle (spawnSessions / PI_WEB_SPAWN_SESSIONS).

Note: adds a session daemon code path, so pi-web-sessiond.service must be
restarted manually for the server side to take effect.
2026-06-16 14:53:37 +02:00
Federico Jaramillo Martinez bfcd975c83 chore: remove docs build Node pin 2026-06-16 11:09:14 +02:00
Federico Jaramillo Martinez 9e277053d1 chore: pin docs build Node version 2026-06-16 10:49:08 +02:00
Federico Jaramillo Martinez d825e5d626 docs: use extensionless canonical URLs 2026-06-15 23:16:52 +02:00
Federico Jaramillo Martinez 61f0b79d63 fix: move session reload action last 2026-06-15 14:15:56 +02:00
Federico Jaramillo Martinez 36800ff41a docs: simplify sitemap to minimal URL list
Drop lastmod/changefreq/priority (stale or ignored signals) and remove
the plugins.md entry, leaving a low-maintenance <loc>-only sitemap.
2026-06-15 02:00:36 +02:00
Federico Jaramillo Martinez 0486baec9b fix: use relative static asset redirects 2026-06-15 01:34:20 +02:00
Federico Jaramillo Martinez 18127996f1 docs: improve Pi web UI SEO positioning 2026-06-15 01:27:34 +02:00
Federico Jaramillo Martinez 3742bcc962 refactor(plugin-api): trim plugin API scope to grounded capabilities
Builds on marcus's plugin-api-completeness work. Narrows the new plugin
surface to capabilities that expose real, otherwise-unreachable pi-web
functionality, and drops invented/duplicative surfaces:

Kept:
- files.writeFile / deleteFile / moveFile (genuine workspace mutation,
  federated, path-safe)
- prompt.insertText / getText / getSelection (editor state access)

Dropped:
- attachments.* (insertFileReference/getAttachedFiles/removeFileReference):
  getAttachedFiles invented a structured-attachment notion pi-web does not
  have and duplicated prompt.getText() + a regex with a false email-safety
  claim; insert/removeFileReference were thin sugar over readFile +
  insertText that plugins can compose themselves.
- prompt.onPaste / onKeyDown: an incomplete two-event hook system shaped
  around a single use case, overlapping the editor's native image-paste
  handling. Deferred until a real editor event/hook surface is designed.
- prompt.focus: redundant and buggier duplicate of the existing
  focusPrompt() (silently no-ops when not on the chat view). Focus stays
  as focusPrompt().

Security fix:
- deleteWorkspaceFile now resolves the parent via realpath + ensureInside
  before lstat/unlink, closing a symlinked-parent-directory escape that
  allowed deleting files outside the workspace (write/move already did
  this). Final path component is still not resolved, so deleting a symlink
  removes the link, not its target. Adds a regression test.

Docs and the registry test mock updated to match the trimmed surface.
2026-06-14 23:16:37 +02:00
Federico Jaramillo Martinez 53ec8c3086 test: remove updates plugin rendering tests
Drop pi-web-plugin.test.ts, which relied on a walk() hack to assert
rendered template content and click wiring. Real decision logic is
already covered by updatesLogic.test.ts; the remaining runCommand glue
is trivial inline code.
2026-06-14 20:39:52 +02:00
Federico Jaramillo Martinez 59a13f5058 test(updates): extract panel logic into a tested module
Move the Updates plugin's pure decision logic (recommended/additional
commands, panel visibility, installation labels, version formatting)
into a sibling updatesLogic.ts module so it can be unit tested directly,
matching the workspace-tasks multi-file plugin layout. The plugin file
is now thin rendering glue that imports those helpers.

Add unit tests for the extracted logic and render smoke tests that
exercise the panel through its public contribution API, including that
Run actions wire to the terminal with the "pi.plugin": "updates"
metadata. No behavior change; the beta label stays.
2026-06-14 17:32:34 +02:00
Federico Jaramillo Martinez 227187c4ca Merge pull request #24 from jmfederico/fix/session-reload-up-to-date
feat(sessions): add Reload action to refresh session from disk
2026-06-14 14:52:56 +02:00
Federico Jaramillo MartinezandClaude 9159da9353 feat(sessions): expose reload as a command-palette action and disable when busy
Add a "Reload Session" core action so reload is keyboard-accessible and can be
assigned a custom shortcut, gated by the same guards as the menu item (writable
session, sessions.reload capability, not currently busy). Disable the Reload
menu entry while the session has active work, mirroring the server guard and the
archived-delete control, so users get a clear reason instead of an error toast.

Co-authored-by: Claude <[email protected]>
2026-06-14 14:49:21 +02:00
Federico Jaramillo Martinez 82db15f894 fix(sessions): guard, gate, and test session reload
Build on the original Reload action with the fixes raised in review:

- Server reload() now refuses to run on archived (read-only) sessions
  and when the session has work in progress, mirroring archive(), so a
  reload can no longer silently abort an in-flight agent run.
- Add a sessions.reload runtime capability; the client gates both the
  reloadSession call and the Reload menu entry on it so the action only
  appears for machines whose Pi-Web runtime supports it.
- reloadSession ignores cached-new and archived sessions.
- Add server (PiSessionService + routes) and client (SessionController)
  tests covering reload success, the active-work guard, archived
  rejection, route forwarding, capability gating, and error mapping.
- Restore alphabetical parser import ordering in clients.ts.
- Add a changeset documenting the feature and the sessiond restart note.

Note: touches a session daemon code path, so pi-web-sessiond.service
must be restarted manually for the server side to take effect.
2026-06-14 14:17:51 +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 411e61ac75 feat: use icon actions in chat composer bar
Replace Send/Queue/Steer/Stop text buttons with compact icons, move Attach into the message box, and show the thinking level as a fill gauge. Keeps mobile layouts uncrowded while preserving accessible labels and the readable model selector.
2026-06-14 11:03:56 +02:00
Federico Jaramillo Martinez 6e94554296 Add knip to verify script for ongoing dead-code detection 2026-06-13 22:14:44 +02:00
Federico Jaramillo Martinez edae57b836 Clean up remaining dead code and dependencies
- Replace unused 'codemirror' barrel dep with explicit @codemirror/{state,
  view,commands,language} sub-packages that were imported but unlisted
- Remove unused exports: writeNamespacedQuery, targetWorkspacePathForRun,
  isWorkspaceDeletionRun, piWebConfigDir, duplicate parsePiWebRuntimeResponse
- Remove unused types: WorkspacePanelFiles, WorkspacePanelHost,
  GetActiveSession, SaveAttachmentsResponse, QueryValues
- Drop now-unused re-exports/imports cascading from the above
- Add knip config + 'npm run knip' script for ongoing dead-code detection
2026-06-13 21:57:51 +02:00
Federico Jaramillo Martinez 5d335a7e72 Remove dead/unused code
Delete orphaned files and unreferenced exports flagged by knip/tsc:
- Remove Composer.ts (chat-composer element superseded by prompt-editor)
- Remove plugins/example/index.ts (never registered)
- Drop unused exports: enabledActions, gitDiffUrl, machineWorkspaceKey,
  GlobalSessionSocket, shouldShowMachineSwitcher, renderWorkspaceLabel,
  renderWorkspaceLabelItems, composerStyles alias
- Fix unused parseValue field in PersistentValueMap
2026-06-13 21:48:34 +02:00
Federico Jaramillo Martinez cfb7493384 Improve dark theme user/assistant message distinction
Add per-role left accent stripes and color-coded header labels across
all themes. Lighten the dark theme user-message background, decouple it
from the generic hover color, and brighten the user border so user and
assistant turns are clearly distinguishable.
2026-06-13 21:26:08 +02:00
Federico Jaramillo Martinez a369b1e550 feat: give the sending indicator a distinct color in session lists
Add a dedicated "sending" activity indicator kind (warning color) so a
session uploading attachments is visually distinct from server activity.
Server activity propagates up to workspace/machine rows; client-side
sending does not, and the different color signals that to users.

Also extract sessionRowActivityKind as a pure, exported helper so the
"sending takes precedence, archived/cached-new never show" logic is unit
tested without rendering.
2026-06-13 21:20:46 +02:00
Federico Jaramillo Martinez 886393a31e fix: scope the attachment sending indicator per session
isSendingPrompt was a single global flag, so an in-flight upload showed
the "Sending…" dock on whatever session/machine the user switched to.

Replace it with sendingPrompts, a Record<sessionId, true> keyed like
sessionStatuses/sessionActivities. The controller sets/clears the entry
for the originating session (captured before the await), the chat dock
reads only the selected session's entry, and the session list now shows
the activity dot for a session that is uploading so progress is visible
after switching away. Machine switches clear the record like other
per-session state; deselecting a session no longer cancels its indicator.
2026-06-13 21:09:31 +02:00
Federico Jaramillo Martinez 970c0bf1d2 refactor: extract testable image attachment capture from the composer
The paste/drop/file capture logic (supported-type filtering, unnamed-file
extension fallback, per-file error collection) lived inside PromptEditor,
mixing browser side effects with branching that had no tests.

Move it into a pure promptAttachmentCapture module with the byte reader
injected, so the FileReader side effect stays at the component boundary
and the orchestration is unit-tested. Also removes a duplicated mime->ext
fallback in favour of the shared extensionForImageMimeType helper.
2026-06-13 20:45:16 +02:00
Federico Jaramillo Martinez ecede3ac7c refactor: drive attachment sending state through the chat activity dock
Replace the composer-local "Sending…" indicator with a single, consistent
state surfaced by the existing chat activity dock. The session controller
now owns the full attachment send lifecycle (including the folder-mode
upload + reference rewrite) and toggles an isSendingPrompt flag around it,
which the chat dock renders as "Sending your message…" until the real
server activity supersedes it.

This covers the pre-receipt dead zone (upload, server-side image resize,
first-session open) with one indicator instead of two, and keeps plain
text sends fire-and-forget.
2026-06-13 14:09:04 +02:00
Federico Jaramillo Martinez 53b00c47f9 fix: show sending indicator while uploading attachments
Messages with image attachments could take a moment to appear (large
base64 upload, server-side resize, first-session open) while the composer
cleared instantly, making it look like nothing happened.

Await the send for attachment messages and surface a "Sending…" button
label plus a "Sending your files…" / "Saving your files…" hint, disabling
the composer until the message lands. Plain text messages stay
fire-and-forget so the input frees up instantly.
2026-06-13 13:57:10 +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 847510e240 docs: drop hardcoded sessiond restart command from AGENTS.md 2026-06-13 13:48:28 +02:00
Federico Jaramillo Martinez 3c6b4a4869 feat: detached systemd restart + runnable Updates panel commands
Run Linux restart commands inside a detached transient systemd user
service (systemd-run --user) so the restart survives the launching
terminal being killed and its logs can be inspected via journalctl.

Make the Updates panel actionable: every command has Copy and Run,
a single recommended all-in-one command is shown at the top, and the
rest are grouped as optional additional commands.
2026-06-13 12:58:09 +02:00
Federico Jaramillo Martinez 1000d4ddd6 chore(release): v1.202606.3 2026-06-13 12:07:38 +02:00
Federico Jaramillo Martinez 3d68c78c83 test: make working-directory tests pass on Windows
Drive-qualify resolved paths in fixtures and assert against normalized cwds
so route tests match the values normalizeRequestCwd produces. Skip the
POSIX-shell TerminalService suite on native Windows, where the terminal
feature is unsupported.
2026-06-13 11:48:06 +02:00
Federico Jaramillo Martinez ef03439b5c ci: run verify/build on Linux and Windows, allow manual dispatch
Add a fail-fast: false OS matrix (ubuntu-latest, windows-latest) and a
workflow_dispatch trigger so CI can be run on demand.
2026-06-13 11:41:17 +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 38cf334c40 fix: restart web/UI services before sessiond in restart commands
Running the suggested restart command from a PI WEB terminal kills the
command when sessiond restarts, so services listed after sessiond were
never restarted. Restart web/UI first in both the updates plugin's
suggested command and `pi-web restart` (systemd and launchd).
2026-06-12 20:49:08 +02:00
Federico Jaramillo Martinez 8de25d4a01 chore(release): v1.202606.2 2026-06-11 13:45:24 +02:00