Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
> **⚠️ Fork Notice:** This is a personal fork of [21st-dev/1code](https://github.com/21st-dev/1code) maintained by [@aletc1](https://github.com/aletc1). It includes additional features and fixes not yet merged upstream. For the official release, visit the [original repository](https://github.com/21st-dev/1code).

# 1Code

[1Code.dev](https://1code.dev)
Expand All @@ -6,6 +8,20 @@ Open-source coding agent client. Run Claude Code, Codex, and more - locally or i

By [21st.dev](https://21st.dev) team

## Fork Additions

Enhancements added in this fork on top of upstream:

- **Per-Mode Thinking Effort** - Set Claude's thinking budget independently for Plan and Agent modes
- **Usage Statistics** - Built-in page showing Claude + Codex token and cost tracking
- **Per-Mode Default Models** - Configure default model per mode with automatic switching on mode change
- **Latest Claude Models** - Opus 4.7 and updated model list including latest Claude releases
- **Wider Chat Column** - Expanded chat area (max-w-4xl) for better readability
- **Windows Git Path Fix** - POSIX-normalized git paths so the sidebar tree view works on Windows
- **Enter / Shift+Enter Swap** - Enter submits, Shift+Enter inserts a newline (matches common conventions)

---

## Highlights

- **Multi-Agent Support** - Claude Code and Codex in one app, switch instantly
Expand Down
32 changes: 30 additions & 2 deletions src/renderer/features/usage/usage-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
desktopViewAtom,
usagePeriodAtom,
usageSourceAtom,
agentsSidebarOpenAtom,
type UsagePeriod,
type UsageSourceFilter,
} from "../agents/atoms"
Expand All @@ -14,7 +15,10 @@ import { ActivityHeatmap } from "./components/activity-heatmap"
import { DailyCostChart } from "./components/daily-cost-chart"
import { ModelBreakdown } from "./components/model-breakdown"
import { formatCompact, formatUSD } from "./lib/format"
import { RefreshCw } from "lucide-react"
import { RefreshCw, AlignJustify } from "lucide-react"
import { useIsMobile } from "../../lib/hooks/use-mobile"
import { AgentsHeaderControls } from "../agents/ui/agents-header-controls"
import { Button } from "../../components/ui/button"

const PERIOD_OPTIONS: { value: UsagePeriod; label: string }[] = [
{ value: "7d", label: "7d" },
Expand All @@ -33,6 +37,8 @@ export function UsageContent() {
const [period, setPeriod] = useAtom(usagePeriodAtom)
const [source, setSource] = useAtom(usageSourceAtom)
const setDesktopView = useSetAtom(desktopViewAtom)
const [sidebarOpen, setSidebarOpen] = useAtom(agentsSidebarOpenAtom)
const isMobile = useIsMobile()

useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
Expand Down Expand Up @@ -64,7 +70,28 @@ export function UsageContent() {
})

return (
<div className="h-full overflow-y-auto">
<div className="h-full flex flex-col overflow-hidden">
{/* Header bar — mirrors kanban layout */}
<div className="flex-shrink-0 flex items-center p-1.5">
{isMobile ? (
<Button
variant="ghost"
size="icon"
onClick={() => setDesktopView(null)}
className="h-6 w-6 p-0 hover:bg-foreground/10 transition-[background-color,transform] duration-150 ease-out active:scale-[0.97] text-foreground flex-shrink-0 rounded-md"
aria-label="Back"
>
<AlignJustify className="h-4 w-4" />
</Button>
) : (
<AgentsHeaderControls
isSidebarOpen={sidebarOpen}
onToggleSidebar={() => setSidebarOpen((prev) => !prev)}
/>
)}
</div>

<div className="flex-1 overflow-y-auto">
<div className="max-w-5xl mx-auto px-6 py-6 flex flex-col gap-6">
<div className="flex items-center justify-between gap-4 flex-wrap">
<div>
Expand Down Expand Up @@ -165,6 +192,7 @@ export function UsageContent() {
</>
)}
</div>
</div>
</div>
)
}
Expand Down