Conversations page: pump, search, read the transcript; docs and the libredesk link
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3544f29d85
commit
45db86d1ff
8 files changed
+127
-16
No files matched your search
+11
-2
@@ -1,6 +1,6 @@
|
||||
# The AIMsight web app
|
||||
|
||||
The tool of the manual diagnostic: two pages, **Data** and **Stations**.
|
||||
The tool of the manual diagnostic: three pages, **Data**, **Stations** and **Conversations**.
|
||||
|
||||
## The Data page
|
||||
|
||||
@@ -46,12 +46,21 @@ cd app/web && npm install && npm run build # once, and after each change of
|
||||
|
||||
The page opens on `http://127.0.0.1:8770`. Settings by variables: `AIMSIGHT_DATA` (data, default `data/`), `AIMSIGHT_LABELS` (labels, default `labeling/`), `AIMSIGHT_PORT` (8770). To work on the page: `npm run dev` in `app/web/` (http://localhost:5173), the Python server launched next to it.
|
||||
|
||||
## The Conversations page
|
||||
|
||||
The LibreDesk conversations (`helpdesk.sensima.ch`), every inbox and status, private notes included, pumped **read-only** by `~/aimsight-libredesk` (link `libredesk/`, `conversations/pomper.sh` through `conversations/pompage.py`; the app only calls it, the read key stays in that repository's `.env`) into `labeling/auto/conversations/<reference>/`: `conversation.json`, `messages.json`, `attachments/`, and `transcript.md`, the readable thread.
|
||||
|
||||
- **Pump**: without dates, what changed since the last complete pumping (`pumped.json`; the first time, the whole history, at a quiet hour); with dates, the conversations updated in that range (To excluded). One at a time; the end of `out/conversations.log` of that repository read every 2 s. The commit of `auto/conversations/` in `~/aimsight-labeling` is the user's.
|
||||
- **The list**: the pumped conversations, the most recent message first, searched on subject, contact and reference; a click shows the transcript.
|
||||
- **What a client wrote is never run**: the transcript is escaped before Markdown, served with `Content-Security-Policy: default-src 'none'; img-src 'self'` (no script, no remote image or tracking pixel) in a sandboxed frame; a plain image (png, jpg, gif, webp) shows inline, any other attachment (an `.svg`, an `.html`) is downloaded.
|
||||
|
||||
## The folders
|
||||
|
||||
- `server/server.py`: FastAPI; serves the built page and the API under `/api` (stations, images, curves, detectors, labels, analyses, support); answers only the pages of the workstation (local Host, declared JSON).
|
||||
- `server/server.py`: FastAPI; serves the built page and the API under `/api` (stations, images, curves, detectors, labels, analyses, support); answers only the pages of the workstation (local Host, declared JSON); the Conversations routes under `/api/conversations`.
|
||||
- `server/station.py`: the data of the Data page; read-only on `data/` (through `tools/scripts/data.py`), writes only in `labeling/{auto,manual}/`.
|
||||
- `server/analysis.py`: the Analysis tab; launches `claude` with the agent `agents:analyst` (Read, Write, Bash allowed without asking); and the optimization, `/optimize` in Optimizer (Read, Write, Edit, Bash, Agent).
|
||||
- `server/support.py`: the Support tab; launches `claude` with the agent `agents:support` (Read, Write, Edit, Bash, Glob, Grep allowed without asking), through `analysis.run`.
|
||||
- `server/conversations.py`: the Conversations page; calls `libredesk/conversations/pompage.py`, lists `labeling/auto/conversations/`, renders a transcript safely.
|
||||
- `server/check.py`: checks, without calling claude: `.venv/bin/python app/server/check.py`.
|
||||
- `web/`: React (Vite) and Mantine; `src/App.jsx` (header, sidebar, address), `src/pages/Data.jsx` (the page), `src/pages/Images.jsx` (the images, in Data), `src/common.jsx` (requests, selector), `src/main.jsx` (theme). Plotly, dressed in Mantine's colours, loads only with Data. `dist/` and `node_modules/` outside git.
|
||||
|
||||
|
||||
Reference in new issue
Block a user