Mrdips commited on
Commit
d48db9e
·
verified ·
1 Parent(s): a167661

установи коннеторы в него , найди в стети лучший референс для чатат И для разработки помощи интеграции и взлома и легким управление и разверни

Browse files
Files changed (5) hide show
  1. chat.html +44 -7
  2. components/api-connector.js +67 -0
  3. index.html +12 -4
  4. style.css +30 -5
  5. tools.html +24 -2
chat.html CHANGED
@@ -10,15 +10,27 @@
10
  </head>
11
  <body>
12
  <div class="card">
13
- <h1>AI Chat Assistant</h1>
 
 
 
 
 
 
14
  <div id="chat-container" class="mb-4 p-4 border rounded-lg bg-gray-50 h-96 overflow-y-auto">
15
  <!-- Chat messages will appear here -->
16
  </div>
17
  <div class="flex">
18
- <input type="text" id="user-input" placeholder="Type your message..." class="flex-1 p-2 border rounded-l-lg">
19
  <button onclick="sendMessage()" class="bg-blue-500 text-white p-2 rounded-r-lg hover:bg-blue-600">Send</button>
20
  </div>
21
- <div class="mt-4">
 
 
 
 
 
 
22
  <a href="tools.html" class="text-blue-500 hover:underline">Explore Development Tools & SDKs</a>
23
  </div>
24
  </div>
@@ -100,11 +112,36 @@
100
  sendMessage();
101
  }
102
  });
103
-
104
- // Initial welcome message
 
 
 
 
 
 
 
 
 
 
 
 
105
  window.onload = function() {
106
- addMessage('ai', 'Hello! I am your AI assistant. How can I help you today?');
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  };
108
- </script>
109
  </body>
110
  </html>
 
10
  </head>
11
  <body>
12
  <div class="card">
13
+ <h1>AI Development Assistant</h1>
14
+ <div class="flex mb-4 space-x-2">
15
+ <button onclick="setContext('hacking')" class="px-3 py-1 bg-gray-800 text-white rounded hover:bg-gray-700">Hacking</button>
16
+ <button onclick="setContext('integration')" class="px-3 py-1 bg-blue-600 text-white rounded hover:bg-blue-700">Integration</button>
17
+ <button onclick="setContext('debugging')" class="px-3 py-1 bg-green-600 text-white rounded hover:bg-green-700">Debugging</button>
18
+ <button onclick="setContext('automation')" class="px-3 py-1 bg-purple-600 text-white rounded hover:bg-purple-700">Automation</button>
19
+ </div>
20
  <div id="chat-container" class="mb-4 p-4 border rounded-lg bg-gray-50 h-96 overflow-y-auto">
21
  <!-- Chat messages will appear here -->
22
  </div>
23
  <div class="flex">
24
+ <input type="text" id="user-input" placeholder="Type your message or command..." class="flex-1 p-2 border rounded-l-lg">
25
  <button onclick="sendMessage()" class="bg-blue-500 text-white p-2 rounded-r-lg hover:bg-blue-600">Send</button>
26
  </div>
27
+ <div class="mt-4 grid grid-cols-2 gap-2">
28
+ <button onclick="insertCommand('/explain')" class="px-2 py-1 bg-gray-200 rounded text-sm hover:bg-gray-300">/explain</button>
29
+ <button onclick="insertCommand('/code')" class="px-2 py-1 bg-gray-200 rounded text-sm hover:bg-gray-300">/code</button>
30
+ <button onclick="insertCommand('/api')" class="px-2 py-1 bg-gray-200 rounded text-sm hover:bg-gray-300">/api</button>
31
+ <button onclick="insertCommand('/fix')" class="px-2 py-1 bg-gray-200 rounded text-sm hover:bg-gray-300">/fix</button>
32
+ </div>
33
+ <div class="mt-4">
34
  <a href="tools.html" class="text-blue-500 hover:underline">Explore Development Tools & SDKs</a>
35
  </div>
36
  </div>
 
112
  sendMessage();
113
  }
114
  });
115
+ let currentContext = 'general';
116
+
117
+ function setContext(context) {
118
+ currentContext = context;
119
+ addMessage('system', `Context set to ${context} mode`);
120
+ }
121
+
122
+ function insertCommand(command) {
123
+ const input = document.getElementById('user-input');
124
+ input.value = command + ' ';
125
+ input.focus();
126
+ }
127
+
128
+ // Initial welcome message with references
129
  window.onload = function() {
130
+ addMessage('ai', `👋 Welcome to DevAssistant!
131
+ I can help with:
132
+ - API Integrations (REST, GraphQL, WebSockets)
133
+ - Debugging (Chrome DevTools, Wireshark)
134
+ - Security (Burp Suite, OWASP ZAP)
135
+ - Automation (Selenium, Puppeteer)
136
+
137
+ Try commands like:
138
+ • /explain [concept] - Get detailed explanations
139
+ • /code [language] - Generate code samples
140
+ • /api [service] - Get API integration help
141
+ • /fix [error] - Debug and fix issues
142
+
143
+ Or click the context buttons above!`);
144
  };
145
+ </script>
146
  </body>
147
  </html>
components/api-connector.js ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class ApiConnector extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ margin: 1rem 0;
9
+ }
10
+ .connector {
11
+ border: 1px solid #e5e7eb;
12
+ border-radius: 8px;
13
+ padding: 1rem;
14
+ background: #f9fafb;
15
+ }
16
+ .header {
17
+ display: flex;
18
+ align-items: center;
19
+ margin-bottom: 0.5rem;
20
+ }
21
+ .icon {
22
+ width: 24px;
23
+ height: 24px;
24
+ margin-right: 0.5rem;
25
+ }
26
+ h3 {
27
+ margin: 0;
28
+ font-size: 1rem;
29
+ font-weight: 600;
30
+ }
31
+ .actions {
32
+ display: flex;
33
+ gap: 0.5rem;
34
+ margin-top: 0.75rem;
35
+ }
36
+ button {
37
+ padding: 0.25rem 0.5rem;
38
+ font-size: 0.875rem;
39
+ border-radius: 4px;
40
+ cursor: pointer;
41
+ }
42
+ .connect {
43
+ background: #3b82f6;
44
+ color: white;
45
+ border: none;
46
+ }
47
+ .docs {
48
+ background: white;
49
+ border: 1px solid #e5e7eb;
50
+ }
51
+ </style>
52
+ <div class="connector">
53
+ <div class="header">
54
+ <img src="http://static.photos/technology/200x200/${Math.floor(Math.random() * 100)}" class="icon">
55
+ <h3><slot name="name">API Connector</slot></h3>
56
+ </div>
57
+ <div><slot name="description">Connect to external APIs</slot></div>
58
+ <div class="actions">
59
+ <button class="connect">Connect</button>
60
+ <button class="docs">Docs</button>
61
+ </div>
62
+ </div>
63
+ `;
64
+ }
65
+ }
66
+
67
+ customElements.define('api-connector', ApiConnector);
index.html CHANGED
@@ -11,10 +11,18 @@
11
  </head>
12
  <body>
13
  <div class="card">
14
- <h1>The Colorless Wonder</h1>
15
- <p>Welcome to the Colorless Wonder website.</p>
16
- <p><a href="chat.html" class="text-blue-500 hover:underline">Chat with our AI assistant</a></p>
17
- <p><a href="tools.html" class="text-blue-500 hover:underline">Explore Development Tools & SDKs</a></p>
 
 
 
 
 
 
 
 
18
  </div>
19
  </body>
20
  </html>
 
11
  </head>
12
  <body>
13
  <div class="card">
14
+ <h1>Developer Nexus</h1>
15
+ <p>Powerful tools for developers, hackers, and security researchers.</p>
16
+ <div class="mt-4 grid grid-cols-2 gap-4">
17
+ <a href="chat.html" class="p-3 border rounded-lg hover:bg-gray-50 block">
18
+ <div class="font-medium">AI Assistant</div>
19
+ <div class="text-sm text-gray-600">Smart coding help and automation</div>
20
+ </a>
21
+ <a href="tools.html" class="p-3 border rounded-lg hover:bg-gray-50 block">
22
+ <div class="font-medium">Toolkit</div>
23
+ <div class="text-sm text-gray-600">Essential dev tools & connectors</div>
24
+ </a>
25
+ </div>
26
  </div>
27
  </body>
28
  </html>
style.css CHANGED
@@ -15,15 +15,40 @@ p {
15
  margin-bottom: 10px;
16
  margin-top: 5px;
17
  }
18
-
19
  .card {
20
- max-width: 620px;
21
  margin: 0 auto;
22
- padding: 16px;
23
- border: 1px solid lightgray;
24
- border-radius: 16px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
 
 
 
 
 
27
  .card p:last-child {
28
  margin-bottom: 0;
29
  }
 
15
  margin-bottom: 10px;
16
  margin-top: 5px;
17
  }
 
18
  .card {
19
+ max-width: 720px;
20
  margin: 0 auto;
21
+ padding: 20px;
22
+ border: 1px solid #e5e7eb;
23
+ border-radius: 12px;
24
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
25
+ }
26
+
27
+ #chat-container {
28
+ background: #f9fafb;
29
+ font-family: 'SF Mono', 'Roboto Mono', monospace;
30
+ font-size: 14px;
31
+ }
32
+
33
+ #chat-container div[class*="bg-gray-100"] {
34
+ max-width: 80%;
35
+ background: #f3f4f6;
36
+ border-left: 3px solid #3b82f6;
37
+ padding: 10px 12px;
38
+ }
39
+
40
+ #chat-container div[class*="bg-blue-100"] {
41
+ max-width: 80%;
42
+ background: #ebf5ff;
43
+ border-right: 3px solid #2563eb;
44
+ padding: 10px 12px;
45
  }
46
 
47
+ button[onclick^="setContext"] {
48
+ font-size: 14px;
49
+ font-weight: 500;
50
+ transition: all 0.2s;
51
+ }
52
  .card p:last-child {
53
  margin-bottom: 0;
54
  }
tools.html CHANGED
@@ -10,10 +10,31 @@
10
  </head>
11
  <body>
12
  <div class="card">
13
- <h1>Development Tools & SDKs</h1>
14
- <p>Explore our collection of development tools, APIs, and SDKs for building amazing applications.</p>
15
 
16
  <div class="mt-6">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  <h2 class="text-xl font-semibold mb-4">API Integration Tools</h2>
18
  <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
19
  <div class="border p-4 rounded-lg">
@@ -78,5 +99,6 @@
78
  <a href="index.html" class="text-blue-500 hover:underline">&larr; Back to Home</a>
79
  </div>
80
  </div>
 
81
  </body>
82
  </html>
 
10
  </head>
11
  <body>
12
  <div class="card">
13
+ <h1>Developer Toolkit</h1>
14
+ <p>Connect with essential development tools and APIs for building, debugging, and securing applications.</p>
15
 
16
  <div class="mt-6">
17
+ <h2 class="text-xl font-semibold mb-4">API Connectors</h2>
18
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
19
+ <api-connector>
20
+ <span slot="name">Postman API</span>
21
+ <span slot="description">Test and document APIs with collections</span>
22
+ </api-connector>
23
+ <api-connector>
24
+ <span slot="name">Burp Suite</span>
25
+ <span slot="description">Web security testing toolkit</span>
26
+ </api-connector>
27
+ <api-connector>
28
+ <span slot="name">OWASP ZAP</span>
29
+ <span slot="description">Automated security scanner</span>
30
+ </api-connector>
31
+ <api-connector>
32
+ <span slot="name">Wireshark</span>
33
+ <span slot="description">Network protocol analyzer</span>
34
+ </api-connector>
35
+ </div>
36
+ </div>
37
+ <div class="mt-6">
38
  <h2 class="text-xl font-semibold mb-4">API Integration Tools</h2>
39
  <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
40
  <div class="border p-4 rounded-lg">
 
99
  <a href="index.html" class="text-blue-500 hover:underline">&larr; Back to Home</a>
100
  </div>
101
  </div>
102
+ <script src="components/api-connector.js"></script>
103
  </body>
104
  </html>