Commits
Marek Vsechovsky committed 35f393b24a5
All these implemented mostly: ## Miscellaneous changes and new features If no AI Session is selected make the Workflow tab look disabled but allow a click, in which case display an alert2 dialog of info type telling the user that he has to select or create a new session first. When a user creates a new project the root path must be entered and the project actually be there, so verify that it indeed exists and don't let the user to save the project if the path is not available. Give the user feedback what they need to do in order to continue. Upon each project selection including all (re)loads of the page, check that the selected project's root path actually exists. If not, force the user to browse for it and don't allow any project that does not point to an actual existing path on the concrete user's machine to be selected. Save and show the root paths per machine. If a different user (users not implemented yet) opens the application for the first time and select a project to work on, tell them that they have to specify the location of that project on the machine they are currently on and let them select the path. Save those paths locally in browser local storage. Once the project root folder is selected and the /.aisman directory does not exist there, create it automatically. You may need to ask for access permission to the root folder or tell the user that they do not have to give it if they create the /.aisman directory in the root manually and then they click another button to tell the app that it has been added and the app should ask for access to that directory. That time they MUST give the access or the tool will not work. Request a permanent access to that directory. Once you have the access, put the current Aisman instructions file there (load it from the server) and name it instructions.md. Next create a sub-directory called outputs. Nothing else can be allowed to work until these directories exist and are accessible to the page. Update the Aisman code to check on startup automatically if the "output" directory exist and also check if any new files since the last time it looked had appeared there and it should process them. But in order to make the user aware what is happeing add tabs interface to the project detail panel - one tab named "Project details" showing the current details of the project, and second called "New detected AI outputs". Upon the project selection by the user (or the last opened selected automatically) this second tab should be selected if any new unprocessed files were detected and list them, showing the actual file name as well as the title they were given by the AI. Double-clicking the row should open the output in an overlay panel, dismissable with Esc or a standard window X button. Show the formatted-code colorized view, non editable. Above the list shuld be the buttons to "Do not process any" (danger color), "Process selected" (primary color) and "Process all" (success color). The rows should have big checkbox-like squares in the first column to select/deselect them for the "Process selected" option. Until the user choses one of these options do not let them switch to any other tab, only to a different project. If a different tab is clicked, show them a warning style message explaining that they have to click one of the buttons on the "New detected AI outputs" and after they click the OK button on that message switch them back to the new output files list. Put the new tabs under the TOTAL ISSUES and IMPLEMENTED counters and add TOTAL SESSIONS and TOTAL STEPS counters there also. Use "new const directoryHandle = await window.showDirectoryPicker()" browser feature if the target directory exists to get permanent access to the .aisman directory within it. Use a fallback to be able to work in older browsers where the user may need to approve the access on every new browsing session in Aisman. Add a new alert style called "note" which should have light yellow post-it note style colors, including the background being light yellow. Try to set the font for that style to some very readable handwriting style font that would still fit nicely with the overall app design. In all the Markdown-capable textboxes in the application I want them to open the previews scrolled to the same place where the edit view is scrolled to when the user switches the views. So show as the first row the same row that is currently scrolled to as first in the edit view. I also want the code blocks to have line numbers and to be colorized with a nice colourful template for json. When a new project is added, open the project details form on the right immediately and do not let the user save it until the project root path is set and verified that it exists. Do not allow the user to switch to Issues, Sessions or Workflow tabs until the user specifies the project's root folder and that folder exists. Let those tabs enabled, but upon clicking them first check that the project root path is set and exists. Remember this check in browser local storage. If the path is not set or does not exist then pop up an error modal dialog telling the user that they need to edit the project details and set the valid root path. Show the content of the instructions files on the Settings tab by default in the Preview mode. Create landing and other standard pages: Apart from the improvements and new features above create a whole, professional looking landing page and any standard pages like pricing, faq, and especially help pages explaining all that was explained above and all that you can deduce from the code. We will later (not now) implement ms identity and add organizations to the mix and will offer Aisman as a real commercial product on the web. These should all be standard MVC pages in a new Home directory. Add to help pages an explanation of how this must be set up in order for it to work - either you rely on tool-specific base instruction files (for example "/.github/copilot-instructions.md" or ".roo/rules.md" etc.) into which the user must include the reference to strictly follow the Aisman instructions as well (using the "Insert Aisman instructions" button), or the user can create a custom instructions file in the root of the selected project and select the option "Custom instruction file" in "General settings" tab, "DEFAULT INSTRUCTIONS FILE" group. ## General settings changes required: Rename the Settings tab called "AI tool instructions template" to "Aisman instructions" and in the detail view give it the title "Aisman IA tool instructions" and below the dividing line a description that reads "This is the main file that needs to be pointed out to the AI coding assistant to explain to it how to understand the input message and how to ouptup the results from each chat session step." and in another paragraphs say "You can find this file in your project's /.aisman/instructions.md Implement a highlighting function for settings which will be able to highlight any setting with a light yellow background. For this create a function that will receive an array of setting keys to be highlighted. That function should remove all currently existing highlights and apply them only to the settings listed in the function parameter. Calling it with no parameters should just remove all highlights. Set new location for the Aisman instructions template file. Update the saving of the Aisman instructions file available on the "Aisman instructions" Settings tab to "/.aisman/instructions.md" file and rename and move the file from its current location and name to there. Fix the "Insert Aisman instructions" button behaviour. It was previously supposed to look for an insertion point, but now it should simply insert into the beginning of the file being edited the following two lines: ``` # IMPORTANT PROMPT PARSING INSTRUCTIONS: Follow **strictly** the instructions in `./.aisman/instructions.md`. ``` It first must check that those lines are not in the file yet. If it finds "# IMPORTANT PROMPT PARSING INSTRUCTIONS:" but the second line is different, then alert the user and ask them if it should be overwritten. Sort the items in the Agent dropdown in settings alphabetically, with the [Custom.. ] first. The General settings show the "Save all" button above the settings within a setting group. That is wrong. And the button is full width. Move it in the same line as the title of the panel to the right and make it normal width - that is accommodating the icon and text, no wider. You created renderInstrModeRadios function where you render the options for instruction file. There are several things wrong with that: 1) These are not supposed to be hard-coded. They are supposed to be defined in the Setting and SettingGroup tables and rendered dynamically. Only their value and value changes need to be handled by code. These settings are per user, so in your record generation sql script set that column to true. 2) The way they are rendered currently is not ideal. I already mentioned the Save button being rendered in that group so that you have probably already fixed in previous steps. What I want you to change in how these are rendered are these things: - The radio buttons (and checkgoxes for that matter also) for settings should be rendered in front (on the left) of the text of the option. - I would like both radio buttons and checkboxes to be styled with the color scheme of the application and be bigger. Radio buttons biger circle and checkboxes ideally as sliding switches. 3) The whole container of the control should serve as a label for the control so clicking anywhere should select a radio button if not selected or toggle a checkbox. 4) Obviously, radio buttons in the same group should be mutually exclusive. 5) Any controls in a group where those same settings also have the same parent setting, if the parent setting is a bool-type (like radio button or checkbox) then the child controls should only be enabled if the parent control is checked = has a value of true.