Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
113 changes: 57 additions & 56 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,59 @@
{
"name": "term",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"preview": "vite preview",
"test": "vitest run",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,md}\"",
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,css,md}\"",
"format:rust": "cd src-tauri && cargo fmt --all",
"format:all": "npm run format && npm run format:rust",
"prepare": "husky"
},
"dependencies": {
"eslint-define-config": "^2.1.0",
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"devDependencies": {
"@eslint/js": "^9.25.0",
"@tauri-apps/api": "^2.5.0",
"@tauri-apps/cli": "^2.5.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^29.5.14",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@vitejs/plugin-react": "^4.4.1",
"@vitest/coverage-v8": "3.1.4",
"autoprefixer": "^10.4.21",
"eslint": "^9.25.0",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.19",
"globals": "^16.0.0",
"husky": "^9.0.11",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jsdom": "^26.1.0",
"lint-staged": "^16.0.0",
"postcss": "^8.5.3",
"prettier": "^3.2.5",
"tailwindcss": "^3.4.17",
"ts-jest": "^29.3.4",
"typescript": "~5.8.3",
"typescript-eslint": "^8.30.1",
"vite": "^6.3.5",
"vitest": "^3.1.4"
},
"packageManager": "[email protected]+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
"name": "term",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"preview": "vite preview",
"test": "vitest run",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,md}\"",
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,css,md}\"",
"format:rust": "cd src-tauri && cargo fmt --all",
"format:all": "npm run format && npm run format:rust",
"prepare": "husky"
},
"dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-markdown": "^8.0.7",
"eslint-define-config": "^2.1.0"
},
"devDependencies": {
"@eslint/js": "^9.25.0",
"@tauri-apps/api": "^2.5.0",
"@tauri-apps/cli": "^2.5.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^29.5.14",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@vitejs/plugin-react": "^4.4.1",
"@vitest/coverage-v8": "3.1.4",
"autoprefixer": "^10.4.21",
"eslint": "^9.25.0",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.19",
"globals": "^16.0.0",
"husky": "^9.0.11",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jsdom": "^26.1.0",
"lint-staged": "^16.0.0",
"postcss": "^8.5.6",
"prettier": "^3.2.5",
"tailwindcss": "^3.4.17",
"ts-jest": "^29.3.4",
"typescript": "~5.8.3",
"typescript-eslint": "^8.30.1",
"vite": "^6.3.5",
"vitest": "^3.1.4"
},
"packageManager": "[email protected]+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
}
8 changes: 6 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import Terminal from './components/Terminal';
import './App.css';
import Terminal from './components/Terminal';

function App() {
return <Terminal />;
return (
<div className="h-screen w-full">
<Terminal />
</div>
);
}

export default App;
37 changes: 37 additions & 0 deletions src/components/Terminal.tsx
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn’t the actual terminal component - the real one is in components/Terminal/index.tsx and handles input, history, command execution, and AI response handling. this new file isn’t used in the app and doesn’t integrate with anything.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { useState } from 'react';
import ReactMarkdown from 'react-markdown';

interface Message {
type: 'command'|'output'|'error'|'llm';
text: string;
}

export default function Terminal() {
const [messages] = useState<Message[]>([
{
type: 'llm',
text: '**Welcome!**\n\n_Everything you type will render as Markdown._\n\nTry list:\n- Item 1\n- Item 2\n\nCode:\n```\necho hello\n```'
}
]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rn the messages array is hardcoded — this just demos markdown rendering, but isn’t actually wired into the real terminal logic or AI response handling. can you hook this into the actual data flow where llm messages are pushed during runtime?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure I'll do


return (
<div className="terminal-container">
<div className="terminal-output">
{messages.map((msg, idx) => (
<div key={idx} className={`terminal-line ${msg.type}`}>
{msg.type === 'llm'
? <ReactMarkdown>{msg.text}</ReactMarkdown>
: msg.text}
</div>
))}
</div>
<div className="terminal-input">
<input
className="font-mono"
placeholder="Type a command..."
disabled
/>
</div>
</div>
);
}
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
error: '#e06c75',
llm: '#98c379',
prompt: '#61afef',
border: '#333',
border: '#333'
}
},
fontFamily: {
Expand Down
1 change: 1 addition & 0 deletions term
Submodule term added at f40091