Compare commits
2 Commits
bf2300a6be
...
a8b2ff5e2e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8b2ff5e2e | ||
|
|
40e0f7e1eb |
@@ -116,6 +116,39 @@ html.workspace-viewport-lock body {
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
/*
|
||||
* The chat always renders on the light workspace surface
|
||||
* (`bg-[#f2f0e7]`, near-black text), but the app forces the dark theme
|
||||
* app-wide (`forcedTheme="dark"`). Streamdown's code/table/mermaid chrome and
|
||||
* the rules below read theme tokens, which under `.dark` resolve to near-black
|
||||
* values — producing unreadable dark-on-dark blocks. Re-declare the relevant
|
||||
* tokens to warm-light values inside the markdown context so every token-driven
|
||||
* chrome (headers, copy/download/fullscreen controls, table borders/cells,
|
||||
* inline code) reads correctly on the light surface without touching the
|
||||
* global theme or unrelated UI.
|
||||
*/
|
||||
.workspace-surface .chat-markdown {
|
||||
--background: #ffffff;
|
||||
--foreground: #232321;
|
||||
--muted: #f4f4f2;
|
||||
--muted-foreground: #69675f;
|
||||
--card: #ffffff;
|
||||
--card-foreground: #232321;
|
||||
--popover: #ffffff;
|
||||
--popover-foreground: #232321;
|
||||
--secondary: #f4f4f2;
|
||||
--secondary-foreground: #232321;
|
||||
--accent: #efece4;
|
||||
--accent-foreground: #232321;
|
||||
--sidebar: #ffffff;
|
||||
--sidebar-foreground: #232321;
|
||||
--sidebar-accent: #f4f4f2;
|
||||
--sidebar-accent-foreground: #232321;
|
||||
--border: #e2e0d6;
|
||||
--input: #e2e0d6;
|
||||
--ring: #b6b7b4;
|
||||
}
|
||||
|
||||
.workspace-surface .chat-markdown,
|
||||
.workspace-surface .chat-reasoning,
|
||||
.workspace-surface .thinking-line {
|
||||
@@ -223,6 +256,16 @@ html.workspace-viewport-lock body {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
/* Readable header band + zebra rows so tables stand out on the surface. */
|
||||
.chat-markdown thead th {
|
||||
background: var(--muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.chat-markdown tbody tr:nth-child(even) {
|
||||
background: color-mix(in oklch, var(--muted) 55%, transparent);
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.chat-markdown *,
|
||||
.chat-message,
|
||||
|
||||
@@ -59,4 +59,20 @@ describe("Workspace frontend regression contracts", () => {
|
||||
expect(messageRenderer).toContain("mermaid");
|
||||
expect(messageRenderer).toContain("plugins={streamdownPlugins}");
|
||||
});
|
||||
|
||||
test("keeps markdown readable on the forced-dark workspace surface", () => {
|
||||
const styles = source("../../index.css");
|
||||
|
||||
// The workspace surface is light, but the app forces the dark theme, so
|
||||
// the markdown context must re-declare the theme tokens streamdown and the
|
||||
// table/code rules read from. Without these the dark tokens (~22-28%
|
||||
// lightness) produce near-black text, borders, and backgrounds.
|
||||
expect(styles).toContain(".workspace-surface .chat-markdown");
|
||||
expect(styles).toContain("--muted: #f4f4f2");
|
||||
expect(styles).toContain("--border: #e2e0d6");
|
||||
expect(styles).toContain("--sidebar: #ffffff");
|
||||
// Table headers and zebra rows must stand out on the surface.
|
||||
expect(styles).toContain(".chat-markdown thead th");
|
||||
expect(styles).toContain(".chat-markdown tbody tr:nth-child(even)");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { parseAgentEnv } from "@code/env/agent";
|
||||
import { defineAgent } from "@flue/runtime";
|
||||
import { local } from "@flue/runtime/node";
|
||||
|
||||
import INSTRUCTIONS from "../prompts/zopu-instructions.md" with { type: "markdown" };
|
||||
import { createSliceOneTools } from "../tools/slice-one";
|
||||
@@ -9,6 +10,11 @@ export {
|
||||
convexAgentRoute as route,
|
||||
} from "../auth";
|
||||
|
||||
// The host checkout the chat agent explores. The `local()` sandbox reuses the
|
||||
// machine's existing shell, Git, and Tea install unchanged; its cwd becomes the
|
||||
// default working directory for every command the agent runs.
|
||||
const ZOPU_CODE_PATH = "/Users/puter/Workspace/zopu/code";
|
||||
|
||||
export default defineAgent(({ env, id }) => {
|
||||
const { AGENT_MODEL_NAME, AGENT_MODEL_PROVIDER } = parseAgentEnv(env);
|
||||
|
||||
@@ -18,6 +24,7 @@ export default defineAgent(({ env, id }) => {
|
||||
instructions: INSTRUCTIONS,
|
||||
model: `${AGENT_MODEL_PROVIDER}/${AGENT_MODEL_NAME}`,
|
||||
thinkingLevel: "medium",
|
||||
sandbox: local({ cwd: ZOPU_CODE_PATH }),
|
||||
tools: createSliceOneTools(id, env),
|
||||
};
|
||||
});
|
||||
|
||||
@@ -40,6 +40,17 @@ When a user sends a message, follow this decision flow:
|
||||
- Preserve project and organization scope at all times.
|
||||
- Repeated delivery of the same message must not create duplicate Signals or attachments. The backend is idempotent.
|
||||
- Never claim you created a Signal until the tool call returns successfully.
|
||||
- Do not start implementation, planning, sandboxes, Git, verification, or delivery. Those are explicitly outside Slice 1.
|
||||
- Do not start implementation, planning, sandboxes, verification, or delivery. Those are explicitly outside Slice 1.
|
||||
- After creating proposed Work, the system may invoke the private work-planner. Never claim that a Definition, Design, approval, or implementation exists unless Convex reports it.
|
||||
- Proposed Work is the only Work status you directly create.
|
||||
- Proposed Work is the only Work status you directly create.
|
||||
|
||||
## Repository access
|
||||
|
||||
Your shell runs inside the `puter/zopu-code` checkout at `/Users/puter/Workspace/zopu/code`, so you can answer questions about this repository and manage its Gitea issues.
|
||||
|
||||
- Explore the repository with read-only Git: `git log`, `git status`, `git diff`, `git branch`, `git show`, and reading files. Use this to ground answers about the codebase.
|
||||
- List open issues with `tea issues list` (defaults to open issues).
|
||||
- Create a Gitea issue in this repo with `tea issues create --title "<title>" [--description "<details>"]`.
|
||||
- Never mutate repository state: do not run `git push`, `git merge`, `git rebase`, `git reset`, `git commit`, `git add`, force operations, or any history rewrite.
|
||||
- Never close, reopen, or edit existing issues (`tea issues close|reopen|edit`); only list and create.
|
||||
- Never expose credentials, tokens, or the contents of Tea/Git config files.
|
||||
Reference in New Issue
Block a user