5 Commits
v1.0.1 ... main

Author SHA1 Message Date
Michael Cartner
6e514f2521 fix: version control panel - show correct state when a push is rejected (#23) 2024-02-06 16:03:04 +01:00
Michael Cartner
8a88290dab Update README.md 2024-01-31 16:59:06 +01:00
Michael Cartner
418eff7dc7 Update README.md
Clarified licensing information
2024-01-31 16:34:48 +01:00
Michael Cartner
c95725ec08 fix: syntax error 2024-01-31 16:05:07 +01:00
Michael Cartner
eae223a817 Fixes #13. Missing verify button for OpenAI API key. (#15) 2024-01-31 15:34:56 +01:00
3 changed files with 38 additions and 3 deletions

View File

@@ -33,3 +33,18 @@ $ npm run dev
# Start Noodl Editor test runner # Start Noodl Editor test runner
$ npm run test:editor $ npm run test:editor
``` ```
## Licenses
This repository contains two different licenses for different parts of the Noodl platform.
- Components related to the editor, used to edit Noodl projects, are under GPLv3
- Components related to the end applications, used by the applications Noodl deploys, are under MIT
All of the source code of applications created with Noodl are under MIT. This means you can do project specific changes to the runtime without having to redistribute your changes.
Packaged licensed under MIT:
- `noodl-runtime`
- `noodl-viewer-cloud`
- `noodl-viewer-react`
You can find a MIT LICENSE file in each of these packages. The rest of the repository is licensed under GPLv3.

View File

@@ -7,6 +7,7 @@ import { verifyOpenAiApiKey } from '@noodl-models/AiAssistant/api';
import { PrimaryButton, PrimaryButtonSize, PrimaryButtonVariant } from '@noodl-core-ui/components/inputs/PrimaryButton'; import { PrimaryButton, PrimaryButtonSize, PrimaryButtonVariant } from '@noodl-core-ui/components/inputs/PrimaryButton';
import { Box } from '@noodl-core-ui/components/layout/Box'; import { Box } from '@noodl-core-ui/components/layout/Box';
import { VStack } from '@noodl-core-ui/components/layout/Stack'; import { VStack } from '@noodl-core-ui/components/layout/Stack';
import { PropertyPanelButton } from '@noodl-core-ui/components/property-panel/PropertyPanelButton';
import { PropertyPanelRow } from '@noodl-core-ui/components/property-panel/PropertyPanelInput'; import { PropertyPanelRow } from '@noodl-core-ui/components/property-panel/PropertyPanelInput';
import { PropertyPanelPasswordInput } from '@noodl-core-ui/components/property-panel/PropertyPanelPasswordInput'; import { PropertyPanelPasswordInput } from '@noodl-core-ui/components/property-panel/PropertyPanelPasswordInput';
import { PropertyPanelSelectInput } from '@noodl-core-ui/components/property-panel/PropertyPanelSelectInput'; import { PropertyPanelSelectInput } from '@noodl-core-ui/components/property-panel/PropertyPanelSelectInput';
@@ -31,14 +32,14 @@ export function OpenAiSection() {
const haveGpt4 = !!models['gpt-4']; const haveGpt4 = !!models['gpt-4'];
if (haveGpt4) { if (haveGpt4) {
OpenAiStore.setIsAiApiKeyVerified(true); OpenAiStore.setIsAiApiKeyVerified(true);
ToastLayer.showSuccess('Open AI, API Key is valid with GPT-4!'); ToastLayer.showSuccess('OpenAI API Key is valid with GPT-4!');
} else { } else {
OpenAiStore.setIsAiApiKeyVerified(false); OpenAiStore.setIsAiApiKeyVerified(false);
ToastLayer.showError('Open AI, API Key is missing gpt-4 model Support!'); ToastLayer.showError('OpenAI API Key is missing gpt-4 model Support!');
} }
} else { } else {
OpenAiStore.setIsAiApiKeyVerified(false); OpenAiStore.setIsAiApiKeyVerified(false);
ToastLayer.showError('Open AI, API Key is invalid!'); ToastLayer.showError('OpenAI API Key is invalid!');
} }
} }
@@ -95,6 +96,20 @@ export function OpenAiSection() {
}} }}
/> />
</PropertyPanelRow> </PropertyPanelRow>
<PropertyPanelRow label="API Key" isChanged={false}>
<PropertyPanelButton
properties={{
isPrimary: true,
buttonLabel: 'Verify API Key',
onClick() {
onVerifyApiKey();
}
}}
/>
</PropertyPanelRow>
<Box hasYSpacing>
<Text>Verify your OpenAI API key to start using AI Commands.</Text>
</Box>
</> </>
)} )}

View File

@@ -324,6 +324,11 @@ export function GitStatusButton({ openGitSettingsPopout }: GitStatusButtonProps)
}); });
} else { } else {
ToastLayer.showError('Failed to push. ' + error); ToastLayer.showError('Failed to push. ' + error);
// If the error is a rejected push, we need to fetch again to get the latest state where we can pull and rebase
if (error?.toString().includes('rejected')) {
await fetchRemote();
}
} }
return; return;