-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 落地 Git 仓库页与提交说明生成 #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
57df1f9
feat: 按 issue #9 搭 Git HTTP 与 pkg/git 骨架
SATA260 cf7f3bf
feat: 落地 Git CLI 原语与 HTTP 组合
SATA260 6452697
feat: 加上仓库页,支持暂存、撤回、提交推送和历史
SATA260 e46e371
feat: 按暂存 diff 生成 Conventional 提交说明
SATA260 1ffddb2
fix: 收紧 Git CORS、沙箱默认路径和破坏性操作
SATA260 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| .env | ||
| .env.local | ||
| *.db | ||
| tmp/ | ||
| .DS_Store | ||
| node_modules | ||
| .pnpm-store | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| "use client"; | ||
|
|
||
| import { GitClient } from "@codedock/core/git"; | ||
| import { GitPage, GitProvider } from "@codedock/views/git"; | ||
| import { useMemo } from "react"; | ||
|
|
||
| import { apiBase } from "@/lib/env"; | ||
|
|
||
| export function GitHost() { | ||
| const client = useMemo(() => new GitClient({ baseUrl: apiBase }), []); | ||
|
|
||
| return ( | ||
| <GitProvider client={client}> | ||
| <div className="h-full"> | ||
| <GitPage /> | ||
| </div> | ||
| </GitProvider> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { GitHost } from "../git-host"; | ||
|
|
||
| export default function GitRoutePage() { | ||
| return ( | ||
| <div className="h-full"> | ||
| <GitHost /> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| "use client"; | ||
|
|
||
| import Link from "next/link"; | ||
| import { usePathname } from "next/navigation"; | ||
|
|
||
| const items = [ | ||
| { href: "/", label: "对话", match: (path: string) => path === "/" || path.startsWith("/s/") }, | ||
| { href: "/git", label: "仓库", match: (path: string) => path === "/git" || path.startsWith("/git/") }, | ||
| ] as const; | ||
|
|
||
| export function TestNav() { | ||
| const pathname = usePathname(); | ||
|
|
||
| return ( | ||
| <nav className="flex h-9 shrink-0 items-center gap-1 border-b border-border bg-background px-3 text-xs"> | ||
| <span className="mr-2 font-mono text-[10px] tracking-wider text-muted-foreground/70"> | ||
| 测试 | ||
| </span> | ||
| <span className="mr-2 h-3 w-px bg-border" aria-hidden /> | ||
| {items.map((item) => { | ||
| const active = item.match(pathname); | ||
| return ( | ||
| <Link | ||
| key={item.href} | ||
| href={item.href} | ||
| className={ | ||
| active | ||
| ? "rounded-md bg-muted px-2 py-1 font-medium text-foreground" | ||
| : "rounded-md px-2 py-1 text-muted-foreground hover:bg-accent hover:text-foreground" | ||
| } | ||
| > | ||
| {item.label} | ||
| </Link> | ||
| ); | ||
| })} | ||
| </nav> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Document the configured-origin exception.
server/cmd/server/cors.gopermits exact origins fromCORS_ORIGINS. State that loopback is the default policy and document this explicit allowlist exception.docs/architecture.md#L242-L242: DescribeCORS_ORIGINSwhen documenting the Web-to-server CORS boundary.docs/architecture.md#L266-L266: Replace the loopback-only statement with the default policy plus configured-origin exception.📍 Affects 1 file
docs/architecture.md#L242-L242(this comment)docs/architecture.md#L266-L266🤖 Prompt for AI Agents