+ );
+}
diff --git a/src/config/nav.ts b/src/config/nav.ts
index 85ad889..7d2ad2a 100644
--- a/src/config/nav.ts
+++ b/src/config/nav.ts
@@ -85,7 +85,7 @@ export const sideNavItems: GroupedNavItems[] = [
icon: Wrench,
},
{
- href: "/dashboard/api-communication",
+ href: "/dashboard/api-communications",
title: "Api Communication",
icon: Cloudy,
},
diff --git a/src/constants/data.ts b/src/constants/data.ts
index eb52743..eb6fd8a 100644
--- a/src/constants/data.ts
+++ b/src/constants/data.ts
@@ -1,4 +1,5 @@
import { Account } from "@/types/account";
+import { ApiCommunication } from "@/types/api-communication";
import { Configuration } from "@/types/configuration";
import { Organization } from "@/types/organization";
import { User } from "@/types/user";
@@ -130,3 +131,35 @@ export const dummyConfigurations: Configuration[] = [
created_at: new Date().toISOString(),
},
];
+
+export const dummyApiCommunications: ApiCommunication[] = [
+ {
+ id: 1,
+ messages:
+ "{"messages":[{"role":"system","content":"\n \n You are a professional language detection service.\n You are given a commit message or a commit diff.\n You have to answer with the programming languages and libraries the user input's code is written in.\n You have to ignore comments and strings in variables. \n You can detect up to 3 but you need to be 100% sure.\n \n Always answer in the following json format where "n" is the name of the detected language or library:\n \n [{"n":"PHP", {"n":"Symfony"}] or []\n \n ----------------------------------------\n \n ONLY JSON IS ALLOWED as an answer. No explanation or other text is allowed.\n \n \n"},{"role":"user","content":"Allow PHP 8\n\ndiff --git a/composer.json b/composer.json\nindex 7889d20..4c6382c 100644\n--- a/composer.json\n+++ b/composer.json\n@@ -13,7 +13,7 @@\n ],\n "minimum-stability": "dev",\n "require": {\n- "php": "^7.1.3",\n+ "php": ">=7.1.3",\n "doctrine/inflector": "^1.2",\n "nikic/php-parser": "^4.0",\n "symfony/config": "^3.4|^4.0|^5.0",\n"}]}",
+ completion: '"[{"n":"PHP"}]"',
+ pt: 287,
+ ct: 7,
+ tt: 294,
+ status: "skill_extraction_success",
+ type: "skill_extraction",
+ evaluation:
+ "Uploaded at: 2023-09-20 00:00:00 - Uploader: jschultz@php.net - Developer: fabien@potencier.org - Status: finished",
+ created_at: new Date().toISOString(),
+ },
+ {
+ id: 2,
+ messages:
+ "{"messages":[{"role":"system","content":"\nThis is a training task for a developer who has the following skillMatrix:\n\nskill: PHP - score:7\nskill: Symfony - score: 7\nskill: EasyAdmin - score: 3\n\n===========================================================================\n\n--- task\ntaskTitle: Create a tabbed user administration page in symfony 6 using easy admin\ntaskDescription: \n\n -- index page\n\n - "List" all users that have a Role that matches or is below your own Role\n - "Create" a new user with a Role that matches or is below your own Role \n tab 1\n firstname, lastname, email\n tab 2\n roles with checkboxes\n tab 3\n change password\n - "Edit" a user with a Role that matches or is below your own Role \n tab 1\n form with firstname, lastname, email \n tab 2\n form with roles with checkboxes\n - "Change Password of exiting User"\n form with password and password confirmation \n\n You got 2 hours to finish this task starting from now.\n Document your findings and the challenges you faced. Adhere to the project's coding standards.\n \n===========================================================================\n\nThe user will give you another skill matrix and you need to create a task with a task title for training purposes. \n\nAlways answer in the following json format:\n\n{ "taskTitle": "", "taskDescription": "[15-20 sentences formatted in markdown]" }\n\ntaskDescription should be written in markdown with proper headlines and formatting.\n\nYou may use newlines in the json response values for formatting reasons.\n\nONLY JSON IS ALLOWED as an answer. No explanation or other text is allowed.\n"},{"role":"user","content":"PHP: 7\nSymfony: 7\n"}]}",
+ completion:
+ ""{ "taskTitle": "Develop a Blogging Platform using Symfony 6", "taskDescription": "\n\nYour task is to create a basic blogging platform using Symfony 6. The platform should have the following features:\n\n- `User Registration and Login`: Implement a user registration and login system using Symfony's security component. Users should be able to register with an email and password.\n\n- `Create Blog Post`: Authenticated users should be able to create a new blog post. A blog post should have a title, content, and the date of creation.\n\n- `List Blog Posts`: Create a page to list all blog posts. Each blog post listing should include the title, an excerpt of the content, and the date of creation. The list should be paginated.\n\n- `View Blog Post`: Users should be able to click on a blog post title in the list to view the full blog post. The full blog post view should include the title, full content, and the date of creation.\n\n- `Edit and Delete Blog Post`: Authenticated users should be able to edit and delete their own blog posts.\n\n- `Comments`: Authenticated users should be able to post comments on a blog post.\n\nYou are given 4 hours to complete this task. Document your findings and the challenges you faced. Adhere to the project's coding standards.\n\n" }"",
+ pt: 364,
+ ct: 271,
+ tt: 635,
+ status: "course_creation_success",
+ type: "course_creation",
+ evaluation:
+ " Uploaded at: 2023-09-20 00:00:00 - Uploader: jschultz@php.net - Developer: fabien@potencier.org - Status: finished",
+ created_at: new Date().toISOString(),
+ },
+];
diff --git a/src/types/api-communication.ts b/src/types/api-communication.ts
new file mode 100644
index 0000000..356ef49
--- /dev/null
+++ b/src/types/api-communication.ts
@@ -0,0 +1,12 @@
+export interface ApiCommunication {
+ id: number;
+ messages: string;
+ completion: string;
+ pt: number;
+ ct: number;
+ tt: number;
+ status: string;
+ type: string;
+ evaluation: string;
+ created_at: string;
+}