-
Notifications
You must be signed in to change notification settings - Fork 41
feat: add t1chat mode #13
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
base: main
Are you sure you want to change the base?
Changes from all commits
c5f8e0d
df3d81a
8c80671
8e07d75
355bd1b
ca1721f
69f4459
002c572
59c7d8c
2bbb929
ab27368
4dfe8b3
5e0973a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,66 @@ | ||||||||||||||||||
| name: Deploy T1 Chat demo | ||||||||||||||||||
|
|
||||||||||||||||||
| on: | ||||||||||||||||||
| push: | ||||||||||||||||||
| branches: | ||||||||||||||||||
| - main | ||||||||||||||||||
| paths: | ||||||||||||||||||
| - "apps/t1code-demo/**" | ||||||||||||||||||
| - ".github/workflows/pages.yml" | ||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||
|
|
||||||||||||||||||
| permissions: | ||||||||||||||||||
| contents: read | ||||||||||||||||||
| id-token: write | ||||||||||||||||||
| pages: write | ||||||||||||||||||
|
|
||||||||||||||||||
| concurrency: | ||||||||||||||||||
| group: github-pages | ||||||||||||||||||
| cancel-in-progress: false | ||||||||||||||||||
|
|
||||||||||||||||||
| jobs: | ||||||||||||||||||
| build: | ||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||
|
|
||||||||||||||||||
| steps: | ||||||||||||||||||
| - name: Check out repository | ||||||||||||||||||
| uses: actions/checkout@v5 | ||||||||||||||||||
|
Comment on lines
+26
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win Set The 🔒️ Proposed fix - name: Check out repository
uses: actions/checkout@v5
+ with:
+ persist-credentials: false📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.26.1)[warning] 26-27: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||||||||
|
|
||||||||||||||||||
| - name: Set up Rust | ||||||||||||||||||
| uses: dtolnay/rust-toolchain@stable | ||||||||||||||||||
| with: | ||||||||||||||||||
| targets: wasm32-unknown-unknown | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Cache Rust builds | ||||||||||||||||||
| uses: Swatinem/rust-cache@v2 | ||||||||||||||||||
| with: | ||||||||||||||||||
| workspaces: apps/t1code-demo -> target | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Install Trunk | ||||||||||||||||||
| run: cargo install trunk --version 0.21.14 --locked | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Build demo | ||||||||||||||||||
| working-directory: apps/t1code-demo | ||||||||||||||||||
| run: trunk build --release --public-url "/${{ github.event.repository.name }}/" | ||||||||||||||||||
|
Comment on lines
+42
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win Avoid direct template expansion inside
🔒️ Proposed fix - name: Build demo
working-directory: apps/t1code-demo
- run: trunk build --release --public-url "/${{ github.event.repository.name }}/"
+ env:
+ REPO_NAME: ${{ github.event.repository.name }}
+ run: trunk build --release --public-url "/${REPO_NAME}/"📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.26.1)[error] 44-44: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||||||||
|
|
||||||||||||||||||
| - name: Configure Pages | ||||||||||||||||||
| uses: actions/configure-pages@v5 | ||||||||||||||||||
| with: | ||||||||||||||||||
| enablement: true | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Upload Pages artifact | ||||||||||||||||||
| uses: actions/upload-pages-artifact@v4 | ||||||||||||||||||
| with: | ||||||||||||||||||
| path: apps/t1code-demo/dist | ||||||||||||||||||
|
|
||||||||||||||||||
| deploy: | ||||||||||||||||||
| needs: build | ||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||
| environment: | ||||||||||||||||||
| name: github-pages | ||||||||||||||||||
| url: ${{ steps.deployment.outputs.page_url }} | ||||||||||||||||||
|
|
||||||||||||||||||
| steps: | ||||||||||||||||||
| - name: Deploy to GitHub Pages | ||||||||||||||||||
| id: deployment | ||||||||||||||||||
| uses: actions/deploy-pages@v4 | ||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ node_modules | |
| *.log | ||
| *.tsbuildinfo | ||
| apps/*/dist | ||
| apps/*/target | ||
| .astro | ||
| packages/*/dist | ||
| .env | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,14 +4,16 @@ | |
|
|
||
| [](./LICENSE) | ||
| [](https://www.npmjs.com/package/@maria_rcks/t1code) | ||
| [](https://github.com/maria-rcks/t1code) | ||
| [](https://github.com/ahzs645/t1chat) | ||
|
|
||
| <img src="./assets/repo/t1code-preview.webp" alt="t1code terminal UI screenshot" width="1000" /> | ||
|
|
||
| _T3Code, but in your terminal._ | ||
|
|
||
| </div> | ||
|
|
||
| ## t1code (code mode) | ||
|
|
||
| Run instantly: | ||
|
|
||
| ```bash | ||
|
|
@@ -27,10 +29,51 @@ bun add -g @maria_rcks/t1code | |
| Develop from source: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/maria-rcks/t1code.git | ||
| git clone https://github.com/ahzs645/t1chat.git | ||
| cd t1code | ||
| bun install | ||
| bun dev:tui | ||
| ``` | ||
|
Comment on lines
+32
to
36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Both "Develop from source" snippets do 📝 Proposed fix git clone https://github.com/ahzs645/t1chat.git
-cd t1code
+cd t1chat
bun install
bun dev:tui(apply the same fix to the second occurrence) Also applies to: 73-77 🤖 Prompt for AI Agents |
||
|
|
||
| ## t1chat (chat mode) | ||
|
|
||
| <div align="center"> | ||
| <img src="./assets/repo/t1chat-preview.png" alt="t1chat terminal UI screenshot" width="1000" /> | ||
| </div> | ||
|
|
||
| t1chat is a chat-focused mode that transforms the TUI into a conversational interface inspired by [T3 Chat](https://t3.chat). It features a pink/magenta/lavender theme, a flat thread list grouped by time, and a streamlined UI without code-specific tools. | ||
|
|
||
| ### What changes in chat mode | ||
|
|
||
| - Sidebar shows a flat thread list grouped by time (Today, Yesterday, Last 7 Days, etc.) instead of nested projects | ||
| - "New Chat" button and thread search in the sidebar | ||
| - Title shows "T1 Chat" instead of "T1 Code" | ||
| - Git tools, diff viewer, Chat/Plan toggle, and Full access button are hidden | ||
| - Settings and temp chat toggle in the top-right corner | ||
| - Composer placeholder says "Type your message here..." | ||
| - Pink/magenta/lavender color scheme matching T3 Chat | ||
|
|
||
| ### Run chat mode | ||
|
|
||
| If installed globally: | ||
|
|
||
| ```bash | ||
| t1chat | ||
| ``` | ||
|
|
||
| Run instantly: | ||
|
|
||
| ```bash | ||
| bunx @maria_rcks/t1code t1chat | ||
| ``` | ||
|
|
||
| Develop from source: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/ahzs645/t1chat.git | ||
| cd t1code | ||
| bun install | ||
| T1CODE_CHAT_MODE=1 bun dev:tui | ||
| ``` | ||
|
|
||
| <sub>Based on T3 Code by [@t3dotgg](https://github.com/t3dotgg) and [@juliusmarminge](https://github.com/juliusmarminge).</sub> | ||
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.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Scope permissions to the job that needs them.
id-token: writeandpages: writeare declared at the workflow level, granting them to thebuildjob as well, which doesn't need them. Move these to thedeployjob only.🔒️ Proposed fix
deploy: needs: build runs-on: ubuntu-latest + permissions: + id-token: write + pages: write environment: name: github-pages🧰 Tools
🪛 zizmor (1.26.1)
[error] 14-14: overly broad permissions (excessive-permissions): id-token: write is overly broad at the workflow level
(excessive-permissions)
[error] 15-15: overly broad permissions (excessive-permissions): pages: write is overly broad at the workflow level
(excessive-permissions)
🤖 Prompt for AI Agents
Source: Linters/SAST tools