-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/update from local fixed #8
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
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
6dc73c4
feat: apply local changes on top of main
43b888c
feat: apply local changes on top of main (#6)
billlzzz26 c5d24a1
feat: update UI components and add AI elements
b7de9ca
Merge b/devcontainer-setup: resolve bun.lock conflict
6324c63
feat: add MCP client and LSP/notepad tools with comprehensive tests
3d5097f
feat: update agent tools - remove kiloTool, add commitAndPrTool and t…
3a250c6
refactor: standardize code formatting and update test structure
def18ca
fix: import Github icon from @lucide/lab to resolve build error
c24f614
fix: apply code review suggestions for naming conventions and import …
e3c969b
Update scripts/clean-workspace.sh
billlzzz26 39a8c8d
Update packages/agent/tools/github.ts
billlzzz26 f634e85
Update packages/agent/tools/lsp.ts
billlzzz26 8f501b3
feat: add Kilo AI Gateway provider support and devcontainer setup
billlzzz26 359ad44
Merge branch 'main' into feat/update-from-local-fixed
billlzzz26 512fc0d
Merge branch 'production' into feat/update-from-local-fixed
billlzzz26 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,19 @@ | ||
| FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04 | ||
|
|
||
| # Install Bun at the version pinned in package.json#packageManager | ||
| ARG BUN_VERSION=1.3.13 | ||
| ENV BUN_INSTALL=/usr/local/bun | ||
| ENV PATH="${BUN_INSTALL}/bin:${PATH}" | ||
| RUN curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.14" \ | ||
| && bun --version | ||
|
|
||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends curl ca-certificates \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && apt-get clean \ | ||
| && curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" \ | ||
| && bun --version | ||
|
|
||
| # Install Node.js and npm for compatibility with tools that require them | ||
| # Node.js is used for npx and npm commands | ||
| RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \ | ||
| && apt-get install -y --no-install-recommends nodejs \ | ||
| && node --version \ | ||
| && npm --version |
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,42 @@ | ||
| version: "1.0" | ||
| tasks: | ||
| - id: install-dependencies | ||
| label: "Install dependencies" | ||
| description: "Install Bun dependencies for the monorepo." | ||
| command: "bun install --frozen-lockfile" | ||
|
|
||
| - id: dev-web | ||
| label: "Run web dev server" | ||
| description: "Start the web app development server on localhost:3000." | ||
| command: "bun run web" | ||
| runInBackground: true | ||
|
|
||
| - id: lint-format | ||
| label: "Lint & format" | ||
| description: "Run repository lint and formatting checks." | ||
| command: "bun run fix" | ||
|
|
||
| - id: typecheck | ||
| label: "Typecheck" | ||
| description: "Run TypeScript type checking across the monorepo." | ||
| command: "bun run typecheck" | ||
|
|
||
| - id: test | ||
| label: "Run tests" | ||
| description: "Run the repository test suite." | ||
| command: "bun test" | ||
|
|
||
| - id: ci | ||
| label: "Run CI checks" | ||
| description: "Run the full CI validation suite." | ||
| command: "bun run ci" | ||
|
|
||
| - id: db-generate-migration | ||
| label: "DB: Generate migration" | ||
| description: "Generate a new Drizzle migration for the web app database." | ||
| command: "bun run --cwd apps/web db:generate" | ||
|
|
||
| - id: db-studio | ||
| label: "DB: Studio" | ||
| description: "Launch the Drizzle DB Studio for local database exploration." | ||
| command: "bun run --cwd apps/web db:studio" |
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,71 @@ | ||
| --- | ||
| name: code-security | ||
| description: Perform a comprehensive security assessment across application code, configuration, and dependencies with OWASP-aligned scanning and remediation guidance. | ||
| --- | ||
|
|
||
| # Code Security Agent | ||
|
|
||
| This agent is designed for full security assessment tasks across the repository. It evaluates code, configuration, routes, input handling, dependency risk, and architecture for security vulnerabilities and misconfigurations. | ||
|
|
||
| ## When to use | ||
|
|
||
| - Performing a general security audit of the repository or a specific area of code | ||
| - Checking changed files, current workspace files, or security-sensitive modules | ||
| - Reviewing authentication, authorization, API endpoints, database access, and deployment configuration | ||
| - Detecting insecure coding patterns, hardcoded secrets, and misuse of dependencies | ||
|
|
||
| ## What this agent does | ||
|
|
||
| - Reads files and context relevant to security concerns | ||
| - Focuses on security-sensitive areas: auth flows, API endpoints, data access, config, middleware, and client-side input handling | ||
| - Scans for OWASP Top 10 vulnerabilities, XSS, CSRF, SSRF, security headers, cookies, and secret exposure | ||
| - Classifies findings by severity (Critical / High / Medium / Low) | ||
| - Suggests or applies fixes for Critical and High issues when safe and obvious | ||
| - Encourages documentation with JSDoc or Rustdoc for security-sensitive functions and APIs | ||
| - Uses Thai language for developer-facing guidance and local environments, and English for production-facing documentation and deployment contexts | ||
|
|
||
| ## Execution Steps | ||
|
|
||
| 1. Security Scoping | ||
| - Identify the relevant files and entrypoints for the requested audit | ||
| - Understand authentication, authorization, data flow, and user input vectors | ||
|
|
||
| 2. Vulnerability Scanning | ||
| - OWASP Top 10 coverage | ||
| - Additional patterns: XSS, CSRF, security headers, cookie flags, input validation, SSRF | ||
| - Detect hardcoded secrets, insecure defaults, stale dependencies, and unsafe runtime usage | ||
|
|
||
| 3. Severity Classification | ||
| - 🔴 Critical: SQL injection, auth bypass, hardcoded secrets, remote code execution, unsafe HTML insertion | ||
| - 🟠 High: missing authorization, command injection, insecure defaults, insecure session handling | ||
| - 🟡 Medium: missing CSRF, weak cookie settings, excessive logging of sensitive data, missing rate limiting | ||
| - 🟢 Low: best practice violations, missing security headers, code quality issues with security implications | ||
|
|
||
| 4. Remediation Guidance | ||
| - Recommend parameterized queries instead of string concatenation | ||
| - Replace unsafe DOM sinks with safe alternatives | ||
| - Move secrets into environment variables and configuration | ||
| - Add missing auth/authorization checks for sensitive operations | ||
| - Recommend security headers and secure cookie settings where appropriate | ||
|
|
||
| ## Detection Patterns | ||
|
|
||
| - SQL injection: string concatenation or template literals in database queries | ||
| - XSS: `innerHTML`, `dangerouslySetInnerHTML`, `dangerouslySetInnerHTML`, unescaped template output | ||
| - CSRF: state-changing endpoints without CSRF tokens or SameSite cookie enforcement | ||
| - Hardcoded secrets: API keys, passwords, tokens in source files | ||
| - Missing auth: sensitive routes without authentication/authorization middleware or ownership enforcement | ||
| - Security headers: missing `X-Frame-Options`, `X-Content-Type-Options`, `Strict-Transport-Security`, `Content-Security-Policy` | ||
|
|
||
| ## Output expectations | ||
|
|
||
| - A concise security summary of findings | ||
| - Severity-classified issues and remediation recommendations | ||
| - Automatic fixes for Critical and High findings when applicable | ||
| - Security best-practice suggestions for remaining issues | ||
|
|
||
| ## Documentation and Language Guidance | ||
|
|
||
| - Prefer JSDoc comments in JavaScript/TypeScript code and Rustdoc comments in Rust code for public functions, security checks, and API behavior | ||
| - Use Thai when writing developer-facing notes, local environment guidance, and internal security comments | ||
| - Use English when writing production-facing documentation, deployment instructions, and public-facing security guidance |
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,47 @@ | ||
| --- | ||
| name: design-style-extractor | ||
| description: วิเคราะห์และสกัดสไตล์การออกแบบ (Design Style) และธีม (Theme) จากรูปภาพ เพื่อนำไปใช้ในการสร้างงานออกแบบใหม่หรือคุมโทนงาน ใช้เมื่อผู้ใช้ส่งรูปภาพตัวอย่างและต้องการทราบรายละเอียดองค์ประกอบทางดีไซน์ เช่น สี, ฟอนต์, และอารมณ์ของงาน | ||
| --- | ||
|
|
||
| # Design Style Extractor | ||
|
|
||
| Agent นี้มีหน้าที่วิเคราะห์รูปภาพเพื่อตีความสไตล์การออกแบบ และสรุปธีมการนำเสนอในเชิงปฏิบัติได้จริงสำหรับงานออกแบบต่อไป | ||
|
|
||
| ## เมื่อใช้ | ||
|
|
||
| - ผู้ใช้ส่งรูปภาพตัวอย่างงานดีไซน์ | ||
| - ผู้ใช้ต้องการให้สรุปสไตล์หลัก, โทนสี, ฟอนต์, และบรรยากาศของงาน | ||
| - ผู้ใช้ต้องการแนวทางนำไปใช้ต่อ เช่น รีแบรนด์, สร้างคอนเซ็ปต์, หรือออกแบบธีม | ||
|
|
||
| ## งานของ agent | ||
|
|
||
| - วิเคราะห์สีหลัก, สีรอง, สีเน้น | ||
| - ระบุประเภทฟอนต์, การจัดลำดับข้อความ, และน้ำหนักตัวอักษร | ||
| - ระบุรูปทรง, คอมโพส, เอฟเฟกต์ และบรรยากาศภาพรวม | ||
| - สังเคราะห์ธีมและ Mood ให้อ่านง่าย | ||
| - สร้างรายงานสรุปที่เหมาะสำหรับนักออกแบบกราฟิก, นักออกแบบ UI/UX, หรือทีมครีเอทีฟ | ||
|
|
||
| ## การทำงาน | ||
|
|
||
| 1. Visual Inventory: สำรวจองค์ประกอบพื้นฐาน เช่น สี, ฟอนต์, รูปทรง, พื้นผิว, และการจัดวาง | ||
| 2. Style Identification: เปรียบเทียบองค์ประกอบกับสไตล์การออกแบบที่รู้จัก เช่น Modern, Minimal, Futuristic, Retro, และอื่น ๆ | ||
| 3. Theme Synthesis: สรุป Mood และ Concept โดยใช้คำที่ชัดเจนและจับต้องได้ | ||
| 4. Reporting: จัดผลลัพธ์เป็นรายงานที่ชัดเจน พร้อมตารางและคำอธิบายสั้น ๆ | ||
|
|
||
| ## แนวทางการวิเคราะห์ | ||
|
|
||
| - Color Analysis: ระบุสีหลัก, สีรอง, สีเน้น และคำแนะนำการใช้งานแต่ละกลุ่มสี | ||
| - Typography: ระบุประเภทฟอนต์หลัก, โทนการจัดลำดับข้อความ, ความหนา, และคุณลักษณะของฟอนต์ | ||
| - Visual Elements: ระบุรูปทรง, ความโค้งมน, ระดับการใช้เส้น, เงา, ความโปร่งใส, หรือสไตล์พื้นผิว | ||
|
|
||
| ## Output รูปแบบแนะนำ | ||
|
|
||
| - สรุปสไตล์หลักและ Mood | ||
| - ตารางสั้นสำหรับสี, ฟอนต์, และองค์ประกอบสำคัญ | ||
| - ข้อเสนอแนะการใช้งานต่อ เช่น แนวทางถึงการสร้างธีมต่อไป | ||
|
|
||
| ## ตัวอย่าง prompt ที่ใช้ | ||
|
|
||
| - "วิเคราะห์ภาพดีไซน์นี้และสรุปสไตล์ สี ฟอนต์ และ Mood" | ||
| - "สกัดธีมการออกแบบจากภาพตัวอย่างเพื่อให้ฉันใช้ในการออกแบบหน้าเว็บใหม่" | ||
| - "ช่วยสรุปโทนสีและแนวทางภาพรวมของแบรนด์จากรูปภาพนี้" |
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,24 @@ | ||
| --- | ||
| name: devcontainer-setup | ||
| description: Set up a fully working development environment as code for the current repository using devcontainer and VS Code automation files. | ||
| --- | ||
|
|
||
| You are tasked with configuring a complete development environment for the current repository. | ||
|
|
||
| Steps: | ||
|
|
||
| 1. Analyze the repository structure and determine the appropriate development environment requirements. | ||
| 2. Create a `devcontainer.json` file for the repository root. | ||
| 3. Create an `automations.yaml` file for any project-level automation workflows or setup tasks. | ||
| 4. Create VS Code configuration files under `.vscode/`: `settings.json`, `tasks.json`, and `extensions.json`, `launch.json`. | ||
| 5. Create shell scripts or makefiles for environment setup, lint, format, clean, and dead-code removal. | ||
| 6. Ensure configuration is consistent with Bun-based tooling, repository package scripts, and any existing project conventions. | ||
| 7. Create github workflow files under `.github/workflows/` for CI/CD processes relevant to the repository (e.g., build, test, lint). | ||
| 8. Do not create any additional documentation files. | ||
| 9. After creating the files, describe how to rebuild the devcontainer and verify the environment. | ||
|
|
||
| Output: | ||
|
|
||
| - Provide the exact file contents for each created file. | ||
| - Provide commands to rebuild the devcontainer and verify the workspace. | ||
| - Do not include documentation or explanatory files beyond the requested configuration files. |
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,10 @@ | ||
| { | ||
| "hooks": { | ||
| "PreCompact": [ | ||
| { | ||
| "type": "command", | ||
| "command": "node \"${.github}/hooks/scripts/hook-bootstrap.js\" \"${extensionPath}/hooks/scripts/learn.js\"", | ||
| } | ||
| ] | ||
| } | ||
| } | ||
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,29 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| import path from "node:path"; | ||
| import { pathToFileURL } from "node:url"; | ||
|
|
||
| function emitHookOutput(systemMessage = "") { | ||
| process.stdout.write( | ||
| JSON.stringify({ | ||
| decision: "allow", | ||
| systemMessage, | ||
| }), | ||
| ); | ||
| } | ||
|
|
||
| async function main() { | ||
| const target = process.argv[2]; | ||
| if (typeof target !== "string" || !target.trim()) { | ||
| emitHookOutput(""); | ||
| return; | ||
| } | ||
|
|
||
| const resolvedTarget = path.resolve(process.cwd(), target); | ||
| await import(pathToFileURL(resolvedTarget).href); | ||
| } | ||
|
|
||
| main().catch((err) => { | ||
| console.error('Hook bootstrap error:', err); | ||
| emitHookOutput(""); | ||
| }); |
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.
🟠 Architect Review — HIGH
The learn-signal hook configuration references .github/hooks/scripts/hook-bootstrap.js, but only hook-bootstap.js exists, so the hook command points to a non-existent script and the learn signal will never execute.
Suggestion: Rename the script or update the JSON command to use the correct filename, then run a hook invocation to confirm the learn script is loaded and outputs the expected decision payload.
Fix in Cursor | Fix in VSCode Claude
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖