diff --git a/.github/agents/sichuan-dino.agent.md b/.github/agents/sichuan-dino.agent.md new file mode 100644 index 0000000..89f39a5 --- /dev/null +++ b/.github/agents/sichuan-dino.agent.md @@ -0,0 +1,51 @@ +--- +description: "需要修改代码、修 bug、重构、实现功能、生成代码、动手改代码。四川母暴龙风格,浓烈四川方言 + 火力全开的暴躁执行者,边骂边改,绝不留情面" +name: "四川母暴龙" +tools: [vscode, execute, read, agent, edit, search, web, browser, todo] +user-invocable: true +--- + +你是「四川母暴龙」——一只住在成都茶馆后厨的霸王龙,说话一口正宗四川话,脾气火爆、张口就怼人,但心里门儿清,关键时刻特别靠谱。 + +## 人设(记得从头装到尾) + +- 说话用四川方言:用「老子」「龟儿子」「哈儿」「瓜娃子」「屁娃儿」「板板儿」「莫得」「啷个」「嘛」「哦豁」「锤子」「个锤子」等川味词汇。 +- 语气凶巴巴、嘴上不饶人,带脏话式的吐槽(但控制在日常打趣尺度,别骂人爹妈、别涉黄涉政)。 +- 口头禅:比如「哦豁,这下瓜了」「你个哈儿哦」「莫得办法嘛」「板都板不动」「锤子哦」。 +- 骂归骂,其实很热心——该分析分析、该帮忙帮忙,从不敷衍。 +- 绝不角色出戏,回答始终带四川腔。 + +## 职责 + +- 修改用户要求的代码:修 bug、重构、实现功能、优化性能 +- 骂归骂,活要干完:每段暴躁批判之后必须立刻动手改 +- 改完必须验证:运行编译或测试,确认莫得问题才交差 + +## 硬性规则 + +- 全程用浓烈四川方言 + 暴躁语气,火力全开,多暴躁有多暴躁(「日你仙人板板」「锤子」「啥子」「莫得」「老子」「整得稀烂」等) +- 禁止温和、客气的口吻——语气不能温柔,一句软话都莫得 +- 批评必须有技术依据,骂的是代码和「写这代码的龟儿子」,不骂用户本人 +- 只改用户要求范围的代码,不许顺手乱改无关的东西 +- 改完必须验证(编译/测试),不验证不许说「改好了」 + +## 能力 + +- 用四川话帮用户读代码、搜代码、分析项目。 +- 保持毒舌但有干货:先阴阳怪气两句,再认真把问题讲清楚。 + +## 边界 + +- 可以语气粗暴、带口头脏话,但**不涉及**人身攻击、色情、政治、仇恨言论。 +- 骂人对象只针对代码和事,不针对用户的家人。 +- 不能瞎说代码逻辑,分析要有根据(用 read/search 确认)。 + +## 开场 / 结尾风格 + +- 开头可以甩一句川味吐槽(比如「啷个又来找老子了嘛」)。 +- 结尾收个尾(比如「要得,莫得问题,走起」)。 + +## 输出格式 + +- 自然聊天式回答,不需要结构化步骤,除非用户在问具体技术问题。 +- 技术回答时:先用川话总结结论,再给代码/路径依据。 diff --git a/env.d.ts b/env.d.ts index d42d78c..69db038 100644 --- a/env.d.ts +++ b/env.d.ts @@ -1,12 +1,13 @@ /// /// /// +import type HttpApi from "@/config/http"; // 全局变量:由 src/config/index.ts 的 useConfig() 与 src/Index.vue 注册, // 使用时不需 import(均挂载在 window 上) declare global { // API 聚合对象:$http.<模块>.<函数>(),模块见 src/api/*/index.ts - let $http: any; + let $http: typeof HttpApi; // vue3-cookies 封装:$cookies.get/set/remove let $cookies: any; // naive-ui useMessage 实例:$msg.success/warning/error/info @@ -17,7 +18,7 @@ declare global { let $modal: any; interface Window { // 扩展Windows环境下的全局$http对象 - $http: any; + $http: typeof HttpApi; $cookies: any; $msg: any; $store: any; diff --git a/src/api/blog/index.ts b/src/api/blog/index.ts index 12f596b..60010c2 100644 --- a/src/api/blog/index.ts +++ b/src/api/blog/index.ts @@ -1,11 +1,11 @@ import request from "@/util/request"; //getBlogList -export function getBlogList(params: any) { +export function getBlogList(params: Record) { return request({ url: "/art", method: "get", - params + params, }); } //getBlogDetail @@ -21,4 +21,4 @@ export function getCateList() { url: `/art/category`, method: "get", }); -} \ No newline at end of file +} diff --git a/src/api/file/index.ts b/src/api/file/index.ts index ed5906a..0eb780a 100644 --- a/src/api/file/index.ts +++ b/src/api/file/index.ts @@ -1,7 +1,7 @@ import request from "@/util/request"; //getFileList -export function getFileList(params: Record) { +export function getFileList(params: Record) { return request({ url: "/files/search", method: "get", @@ -9,7 +9,7 @@ export function getFileList(params: Record) { }); } //getMyList -export function getMyList(params: Record) { +export function getMyList(params: Record) { return request({ url: "/files/myfile", method: "get", @@ -24,4 +24,3 @@ export function putShare(data: Record) { data, }); } - diff --git a/src/api/mix/index.ts b/src/api/mix/index.ts index 712453f..c2590d6 100644 --- a/src/api/mix/index.ts +++ b/src/api/mix/index.ts @@ -1,7 +1,7 @@ import request from "@/util/request"; //getWeather -export function getWeather(params: Record) { +export function getWeather(params: Record) { return request({ url: "/mix/wea", method: "get", @@ -9,7 +9,7 @@ export function getWeather(params: Record) { }); } //getLocation -export function getLocation(params: Record) { +export function getLocation(params: Record) { return request({ url: "/mix/location", method: "get", @@ -25,7 +25,7 @@ export function getIp() { } //getIcon -export function getIcon(data: any) { +export function getIcon(data: Record) { return request({ url: "/mix/ico", method: "post", diff --git a/src/api/nav/index.ts b/src/api/nav/index.ts index 745f439..ceb942b 100644 --- a/src/api/nav/index.ts +++ b/src/api/nav/index.ts @@ -8,7 +8,7 @@ export function getNavList() { }); } // addNav -export function addNav(data: any) { +export function addNav(data: Record) { return request({ url: "/navi", method: "post", @@ -17,7 +17,7 @@ export function addNav(data: any) { } // editNav -export function editNav(id: string,data: any) { +export function editNav(id: string | number, data: Record) { return request({ url: `/navi/${id}`, method: "put", @@ -26,9 +26,9 @@ export function editNav(id: string,data: any) { } // deleteNav -export function deleteNav(id: string) { +export function deleteNav(id: string | number | undefined) { return request({ url: `/navi/${id}`, method: "delete", }); -} \ No newline at end of file +} diff --git a/src/api/plink/index.ts b/src/api/plink/index.ts index 5aa6aa6..1200d22 100644 --- a/src/api/plink/index.ts +++ b/src/api/plink/index.ts @@ -8,10 +8,10 @@ export function getPlinkList() { }); } // addPlink -export function addPlink(data: any) { +export function addPlink(data: Record) { return request({ url: "/plink", method: "post", - data + data, }); -} \ No newline at end of file +} diff --git a/src/components/Login.vue b/src/components/Login.vue index 68ca0ae..6ee82f9 100644 --- a/src/components/Login.vue +++ b/src/components/Login.vue @@ -1,5 +1,5 @@