mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
chore: chatgpt prompts
This commit is contained in:
@@ -71,7 +71,9 @@
|
|||||||
"title": "ChatGPT",
|
"title": "ChatGPT",
|
||||||
"visible": false,
|
"visible": false,
|
||||||
"width": 800,
|
"width": 800,
|
||||||
"height": 600
|
"height": 600,
|
||||||
|
"minWidth": 800,
|
||||||
|
"minHeight": 600
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
5
src/layout/index.tsx
vendored
5
src/layout/index.tsx
vendored
@@ -1,6 +1,6 @@
|
|||||||
import { FC, useState } from 'react';
|
import { FC, useState } from 'react';
|
||||||
import { Layout, Menu } from 'antd';
|
import { Layout, Menu } from 'antd';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate, useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
import Routes, { menuItems } from '@/routes';
|
import Routes, { menuItems } from '@/routes';
|
||||||
|
|
||||||
@@ -14,13 +14,14 @@ interface ChatLayoutProps {
|
|||||||
|
|
||||||
const ChatLayout: FC<ChatLayoutProps> = ({ children }) => {
|
const ChatLayout: FC<ChatLayoutProps> = ({ children }) => {
|
||||||
const [collapsed, setCollapsed] = useState(false);
|
const [collapsed, setCollapsed] = useState(false);
|
||||||
|
const location = useLocation();
|
||||||
const go = useNavigate();
|
const go = useNavigate();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout style={{ minHeight: '100vh' }}>
|
<Layout style={{ minHeight: '100vh' }}>
|
||||||
<Sider theme="light" collapsible collapsed={collapsed} onCollapse={(value) => setCollapsed(value)}>
|
<Sider theme="light" collapsible collapsed={collapsed} onCollapse={(value) => setCollapsed(value)}>
|
||||||
<div className="chat-logo"><img src="/logo.png" /></div>
|
<div className="chat-logo"><img src="/logo.png" /></div>
|
||||||
<Menu defaultSelectedKeys={['/']} mode="vertical" items={menuItems} onClick={(i) => go(i.key)} />
|
<Menu defaultSelectedKeys={[location.pathname]} mode="vertical" items={menuItems} onClick={(i) => go(i.key)} />
|
||||||
</Sider>
|
</Sider>
|
||||||
<Layout className="chat-layout">
|
<Layout className="chat-layout">
|
||||||
<Content className="chat-container">
|
<Content className="chat-container">
|
||||||
|
|||||||
2
src/routes.tsx
vendored
2
src/routes.tsx
vendored
@@ -7,7 +7,7 @@ import type { RouteObject } from 'react-router-dom';
|
|||||||
import type { MenuProps } from 'antd';
|
import type { MenuProps } from 'antd';
|
||||||
|
|
||||||
import General from '@view/General';
|
import General from '@view/General';
|
||||||
import ChatGPTPrompts from '@view/ChatGPTPrompts';
|
import ChatGPTPrompts from '@/view/ChatGPTPrompts';
|
||||||
|
|
||||||
export type ChatRouteObject = {
|
export type ChatRouteObject = {
|
||||||
label: string;
|
label: string;
|
||||||
|
|||||||
7
src/view/ChatGPTPrompts.tsx
vendored
7
src/view/ChatGPTPrompts.tsx
vendored
@@ -1,7 +0,0 @@
|
|||||||
export default function Dashboard() {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
TODO: ChatGPT Prompts
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
23
src/view/ChatGPTPrompts/config.tsx
vendored
Normal file
23
src/view/ChatGPTPrompts/config.tsx
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { Tag, Tooltip } from 'antd';
|
||||||
|
|
||||||
|
export const columns = [
|
||||||
|
{
|
||||||
|
title: 'Command',
|
||||||
|
dataIndex: 'cmd',
|
||||||
|
key: 'cmd',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Type',
|
||||||
|
dataIndex: 'type',
|
||||||
|
key: 'type',
|
||||||
|
render: (v: string) => <Tag>{v}</Tag>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Content',
|
||||||
|
dataIndex: 'content',
|
||||||
|
key: 'content',
|
||||||
|
render: (v: string) => (
|
||||||
|
<Tooltip overlayInnerStyle={{ width: 350 }} title={v}><span className="chat-prompts-val">{v}</span></Tooltip>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
12
src/view/ChatGPTPrompts/index.scss
vendored
Normal file
12
src/view/ChatGPTPrompts/index.scss
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
.chat-prompts-val {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 300px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-btn {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
34
src/view/ChatGPTPrompts/index.tsx
vendored
Normal file
34
src/view/ChatGPTPrompts/index.tsx
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import { Table, Button } from 'antd';
|
||||||
|
|
||||||
|
import { columns } from './config';
|
||||||
|
import './index.scss';
|
||||||
|
|
||||||
|
const dataSource = [
|
||||||
|
{
|
||||||
|
cmd: 'terminal',
|
||||||
|
type: 'dev',
|
||||||
|
content: 'i want you to act as a linux terminal. I will type commands and you will reply with what the terminal should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. do not write explanations. do not type commands unless I instruct you to do so. when i need to tell you something in english, i will do so by putting text inside curly brackets {like this}. my first command is pwd',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd: 'translator',
|
||||||
|
type: 'tools',
|
||||||
|
content: 'I want you to act as an English translator, spelling corrector and improver. I will speak to you in any language and you will detect the language, translate it and answer in the corrected and improved version of my text, in English. I want you to replace my simplified A0-level words and sentences with more beautiful and elegant, upper level English words and sentences. Keep the meaning same, but make them more literary. I want you to only reply the correction, the improvements and nothing else, do not write explanations. My first sentence is "istanbulu cok seviyom burada olmak cok guzel"',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default function ChatGPTPrompts() {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Button className="add-btn" type="primary">Add Command</Button>
|
||||||
|
<Table
|
||||||
|
rowKey="content"
|
||||||
|
columns={columns}
|
||||||
|
dataSource={dataSource}
|
||||||
|
pagination={{
|
||||||
|
hideOnSinglePage: true,
|
||||||
|
pageSize: 10,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user