开发者工具
AI 编程,全栈一体
TronCode 编辑器、TronCLI 终端、TronAPI 统一模型 API,三层全由 Linkwo 出品,覆盖 IDE、命令行与 API。
Dashboard.tsx - TronCode
Explorer···
▾ TRONCODE-APP
src
components
pages
Dashboard.tsx
Settings.tsx
Login.tsx
utils
App.tsx
index.ts
public
package.json
tsconfig.json
Dashboard.tsx
Settings.tsx
src›pages›Dashboard.tsx
1import React, { useState, useEffect } from 'react';
2import { fetchMetrics } from '../utils/api';
3import { MetricCard } from '../components/MetricCard';
4
5export default function Dashboard() {
6 const [metrics, setMetrics] = useState<Metric[]>([]);
7 const [loading, setLoading] = useState(true);
8 const [error, setError] = useState<string | null>(null);
9
10 useEffect(() => {
11 // AI generated: data loading & error handling
12 const loadData = async () => {
13 try {
14 setLoading(true);
15 const data = await fetchMetrics();
16 setMetrics(data);
17 } catch (err) {
18 setError('Load failed, please retry');
19 } finally {
20 setLoading(false);
21 }
22 };
23 loadData();
24 }}, []);
25
26 if (loading) return <LoadingSpinner />;
Agent
Help me add data loading and error handling logic to the Dashboard
I've added complete data loading and error handling to the
Dashboard component:✓ Use useEffect to fetch on mount✓ Add try/catch/finally handling✓ Show LoadingSpinner during loadType a command…
@/Agent
⌘↵
main0 errors 0 warnings
Ln 14, Col 38Spaces: 2UTF-8TypeScript ReactPrettier
TronCode 核心能力
从代码补全到 Agent 工作流,覆盖全开发链路
Agent 工作流
把跨文件改动交给 Agent,自动规划、编写并给出可审阅的 diff。
agent
$ agent: "extract auth into middleware"→ plan: touch 3 filessrc/middleware/auth.ts (new)src/api/route.ts (edit)✓ 12 files done · 1m 42s▋
智能补全
结合整个仓库上下文给出补全建议,一键采纳。
completion
def fetch_user(uid):# → AI suggests ↓return db.query(User, id==uid)▋
代码库问答
对任意符号提问,直达每一处调用与定义。
codebase
? who calls refresh_token→ 3 refs foundauth/route.ts:42middleware.ts:11cli/login.ts:8▋
MCP 集成
通过 MCP 接入外部工具,在编辑器内直接调用。
mcp
$ mcp: connect filesystem, github→ registering tools...filesystem.read_filegithub.create_issuegithub.search_code✓ 18 tools ready▋
TronCLI
终端原生的 AI 编程代理,无需打开 IDE,在命令行完成代码生成、重构、调试,支持 SSH 远程与 CI/CD 集成
- 任意终端可用,无需打开 IDE
- 支持 SSH 远程服务器
- 可脚本化接入 CI/CD
Tron · ~/project/my-app
Tron
你好!我已分析了你的项目。检测到 TypeScript + React 项目,发现 auth.ts 缺少 token 刷新逻辑。需要我帮你添加吗?
你
@src/api/auth.ts里添加 JWT 令牌自动刷新,参考 request.ts 的拦截器写法
✓ 已读取 src/api/auth.ts (128 行)
✓ 已读取 src/utils/request.ts (64 行)
◎ 正在生成代码...
my-app
Context
18,421 tokens
12% used
$0.03 spent
LSP
TypeScript ●
ESLint ●
ESLint ●
≡Build·tron-code·streaming...
Buildtron-codemy-app
tab agents ctrl+p commands~/project/my-appTron
TronAPI
Linkwo 自研的统一模型 API,OpenAI 兼容,一个端点接入 15+ 主流模型,两个环境变量即可开始
TronAPI · api.linkwo.ai/v1/chat
$ POST api.linkwo.ai/v1/chat
-d '{"model":"deepseek-chat"}'
-d 'write a jwt refresh function'
→ streaming code via SSE
← def refresh_token(token):
← payload = jwt.decode(token)
← if expired(payload):
← [DONE]
▋
●200 OK142 tokens$0.001streaming...
从模型 API 到编辑器到终端,贯穿你写代码的每一个入口。
跨端一致
编辑器、终端、统一模型 API 同一条工具链,跨端一致的开发体验,不在工具间反复切换。
生产级
支持私有化部署、SSH 远程、CI/CD 脚本化接入,扛得住真实工程。
统一模型 API
Linkwo 自营,一个端点、OpenAI 兼容,15+ 主流模型,DeepSeek、GLM 等即接即用。
企业就绪
MCP 工具集成、可审阅 diff、可团队协作,满足企业合规与审计。
准备好用 AI 写代码了吗?
选择适合你的工具,立即体验 AI 编程
TronCode 和 TronCLI 是 Linkwo 旗下的专业编程工具品牌