mirror of
https://github.com/stackblitz/bolt.new
synced 2025-02-05 20:46:43 +00:00
Merge pull request #776 from thecodacus/bugfix-for-stable #release
release: Bugfix for stable
This commit is contained in:
commit
89eac1ba8b
4
.github/workflows/update-stable.yml
vendored
4
.github/workflows/update-stable.yml
vendored
@ -161,12 +161,12 @@ jobs:
|
|||||||
- name: Get the latest commit hash and version tag
|
- name: Get the latest commit hash and version tag
|
||||||
run: |
|
run: |
|
||||||
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||||
echo "CURRENT_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
|
echo "NEW_VERSION=${{ steps.bump_version.outputs.new_version }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Commit and Tag Release
|
- name: Commit and Tag Release
|
||||||
run: |
|
run: |
|
||||||
git pull
|
git pull
|
||||||
echo "{ \"commit\": \"$COMMIT_HASH\" , \"version\": \"$CURRENT_VERSION\" }" > app/commit.json
|
echo "{ \"commit\": \"$COMMIT_HASH\", \"version\": \"$NEW_VERSION\" }" > app/commit.json
|
||||||
git add package.json pnpm-lock.yaml changelog.md app/commit.json
|
git add package.json pnpm-lock.yaml changelog.md app/commit.json
|
||||||
git commit -m "chore: release version ${{ steps.bump_version.outputs.new_version }}"
|
git commit -m "chore: release version ${{ steps.bump_version.outputs.new_version }}"
|
||||||
git tag "v${{ steps.bump_version.outputs.new_version }}"
|
git tag "v${{ steps.bump_version.outputs.new_version }}"
|
||||||
|
@ -1 +1 @@
|
|||||||
{ "commit": "c257129a61e258650b321c19323ddebaf03b0a54" , "version": "0.0.1" }
|
{ "commit": "016488998ddd5d21157854246daa7b8224aa8989" }
|
||||||
|
@ -24,6 +24,7 @@ export default function ConnectionsTab() {
|
|||||||
|
|
||||||
const verifyGitHubCredentials = async () => {
|
const verifyGitHubCredentials = async () => {
|
||||||
setIsVerifying(true);
|
setIsVerifying(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch('https://api.github.com/user', {
|
const response = await fetch('https://api.github.com/user', {
|
||||||
headers: {
|
headers: {
|
||||||
@ -33,16 +34,20 @@ export default function ConnectionsTab() {
|
|||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
const data = (await response.json()) as GitHubUserResponse;
|
const data = (await response.json()) as GitHubUserResponse;
|
||||||
|
|
||||||
if (data.login === githubUsername) {
|
if (data.login === githubUsername) {
|
||||||
setIsConnected(true);
|
setIsConnected(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsConnected(false);
|
setIsConnected(false);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error verifying GitHub credentials:', error);
|
console.error('Error verifying GitHub credentials:', error);
|
||||||
setIsConnected(false);
|
setIsConnected(false);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} finally {
|
} finally {
|
||||||
setIsVerifying(false);
|
setIsVerifying(false);
|
||||||
@ -56,6 +61,7 @@ export default function ConnectionsTab() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setIsVerifying(true);
|
setIsVerifying(true);
|
||||||
|
|
||||||
const isValid = await verifyGitHubCredentials();
|
const isValid = await verifyGitHubCredentials();
|
||||||
|
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
|
@ -65,7 +65,9 @@ export default function FeaturesTab() {
|
|||||||
className="flex-1 p-2 ml-auto rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary focus:outline-none focus:ring-2 focus:ring-bolt-elements-focus transition-all text-sm min-w-[100px]"
|
className="flex-1 p-2 ml-auto rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary focus:outline-none focus:ring-2 focus:ring-bolt-elements-focus transition-all text-sm min-w-[100px]"
|
||||||
>
|
>
|
||||||
{PromptLibrary.getList().map((x) => (
|
{PromptLibrary.getList().map((x) => (
|
||||||
<option value={x.id}>{x.label}</option>
|
<option key={x.id} value={x.id}>
|
||||||
|
{x.label}
|
||||||
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,6 +4,7 @@ import * as Dialog from '@radix-ui/react-dialog';
|
|||||||
import { type ChatHistoryItem } from '~/lib/persistence';
|
import { type ChatHistoryItem } from '~/lib/persistence';
|
||||||
import WithTooltip from '~/components/ui/Tooltip';
|
import WithTooltip from '~/components/ui/Tooltip';
|
||||||
import { useEditChatDescription } from '~/lib/hooks';
|
import { useEditChatDescription } from '~/lib/hooks';
|
||||||
|
import { forwardRef, type ForwardedRef } from 'react';
|
||||||
|
|
||||||
interface HistoryItemProps {
|
interface HistoryItemProps {
|
||||||
item: ChatHistoryItem;
|
item: ChatHistoryItem;
|
||||||
@ -103,7 +104,9 @@ export function HistoryItem({ item, onDelete, onDuplicate, exportChat }: History
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ChatActionButton = ({
|
const ChatActionButton = forwardRef(
|
||||||
|
(
|
||||||
|
{
|
||||||
toolTipContent,
|
toolTipContent,
|
||||||
icon,
|
icon,
|
||||||
className,
|
className,
|
||||||
@ -114,14 +117,18 @@ const ChatActionButton = ({
|
|||||||
className?: string;
|
className?: string;
|
||||||
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
||||||
btnTitle?: string;
|
btnTitle?: string;
|
||||||
}) => {
|
},
|
||||||
|
ref: ForwardedRef<HTMLButtonElement>,
|
||||||
|
) => {
|
||||||
return (
|
return (
|
||||||
<WithTooltip tooltip={toolTipContent}>
|
<WithTooltip tooltip={toolTipContent}>
|
||||||
<button
|
<button
|
||||||
|
ref={ref}
|
||||||
type="button"
|
type="button"
|
||||||
className={`scale-110 mr-2 hover:text-bolt-elements-item-contentAccent ${icon} ${className ? className : ''}`}
|
className={`scale-110 mr-2 hover:text-bolt-elements-item-contentAccent ${icon} ${className ? className : ''}`}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
/>
|
/>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
);
|
);
|
||||||
};
|
},
|
||||||
|
);
|
||||||
|
@ -202,8 +202,9 @@ export class ActionRunner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const webcontainer = await this.#webcontainer;
|
const webcontainer = await this.#webcontainer;
|
||||||
|
const relativePath = nodePath.relative(webcontainer.workdir, action.filePath);
|
||||||
|
|
||||||
let folder = nodePath.dirname(action.filePath);
|
let folder = nodePath.dirname(relativePath);
|
||||||
|
|
||||||
// remove trailing slashes
|
// remove trailing slashes
|
||||||
folder = folder.replace(/\/+$/g, '');
|
folder = folder.replace(/\/+$/g, '');
|
||||||
@ -218,8 +219,8 @@ export class ActionRunner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await webcontainer.fs.writeFile(action.filePath, action.content);
|
await webcontainer.fs.writeFile(relativePath, action.content);
|
||||||
logger.debug(`File written ${action.filePath}`);
|
logger.debug(`File written ${relativePath}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Failed to write file\n\n', error);
|
logger.error('Failed to write file\n\n', error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user