| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <pstm-uri>/chats</pstm-uri>
- <pstm-template>main</pstm-template>
- </head>
- <body>
- <section>
- <h2>Chats</h2>
- <p class="text-muted">Your advisor conversations. Ask the advisor on the
- <a href="/">dashboard</a> to start a new one - it can read the fleet's
- state, ask you questions and suggest tasks or goals, but never runs
- commands itself.</p>
- <p class="alert alert-warning" stm-if="chats != null && !chats.advisor_configured">The
- advisor is not configured - set the model endpoint on the <a href="/models">Admin
- → Model</a> page to enable it. Chats you start now
- will wait until then.</p>
- <p stm-if="chats == null">Loading…</p>
- <div stm-if="chats != null">
- <div class="table-wrap">
- <table stm-if="chats.chats.length >
- 0">
- <thead><tr><th>Chat</th><th>Status</th><th>Created</th><th>Updated</th><th></th></tr></thead>
- <tbody>
- <tr stm-for-chat-in="chats.chats" stm-key="chat.id">
- <td><a stm-attribute.href="'/chats/' + chat.id"
- stm-text="chat.title">title</a></td>
- <td><span stm-attribute.class="'badge badge-chat-' + chat.status"
- stm-text="chat.status_display">status</span></td>
- <td stm-text="chat.created_display">when</td>
- <td stm-text="chat.updated_display">when</td>
- <td>
- <form class="cluster">
- <!-- Goal 41 T9: a destructive action should not
- be the row's loudest control - ghost it
- (the confirm still guards it). -->
- <button type="button" class="btn-ghost btn-sm" stm-action="chat.delete"
- stm-confirm="Delete this chat? Its messages and suggestions go with it.">Delete</button>
- </form>
- </td>
- </tr>
- </tbody>
-
- </table>
- </div>
- <p stm-if="chats.chats.length == 0" class="text-muted">No chats yet - type a
- question into the "Ask the advisor" box at the top of the
- <a href="/">dashboard</a> to start one.</p>
- </div>
- </section>
- </body>
- </html>
|