Skip to content

Commit 89eac1b

Browse files
authored
Merge pull request #776 from thecodacus/bugfix-for-stable #release
release: Bugfix for stable
2 parents e61459e + 5567d6d commit 89eac1b

File tree

7 files changed

+47
-31
lines changed

7 files changed

+47
-31
lines changed

.github/workflows/commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
2929
- name: Update commit file
3030
run: |
31-
echo "{ \"commit\": \"$COMMIT_HASH\" , \"version\": \"$CURRENT_VERSION\" }" > app/commit.json
31+
echo "{ \"commit\": \"$COMMIT_HASH\", \"version\": \"$CURRENT_VERSION\" }" > app/commit.json
3232
3333
- name: Commit and push the update
3434
run: |

.github/workflows/update-stable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,12 @@ jobs:
161161
- name: Get the latest commit hash and version tag
162162
run: |
163163
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
164-
echo "CURRENT_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
164+
echo "NEW_VERSION=${{ steps.bump_version.outputs.new_version }}" >> $GITHUB_ENV
165165
166166
- name: Commit and Tag Release
167167
run: |
168168
git pull
169-
echo "{ \"commit\": \"$COMMIT_HASH\" , \"version\": \"$CURRENT_VERSION\" }" > app/commit.json
169+
echo "{ \"commit\": \"$COMMIT_HASH\", \"version\": \"$NEW_VERSION\" }" > app/commit.json
170170
git add package.json pnpm-lock.yaml changelog.md app/commit.json
171171
git commit -m "chore: release version ${{ steps.bump_version.outputs.new_version }}"
172172
git tag "v${{ steps.bump_version.outputs.new_version }}"

app/commit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "commit": "c257129a61e258650b321c19323ddebaf03b0a54" , "version": "0.0.1" }
1+
{ "commit": "016488998ddd5d21157854246daa7b8224aa8989" }

app/components/settings/connections/ConnectionsTab.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { logStore } from '~/lib/stores/logs';
66
interface GitHubUserResponse {
77
login: string;
88
id: number;
9-
[key: string]: any; // for other properties we don't explicitly need
9+
[key: string]: any; // for other properties we don't explicitly need
1010
}
1111

1212
export default function ConnectionsTab() {
@@ -24,6 +24,7 @@ export default function ConnectionsTab() {
2424

2525
const verifyGitHubCredentials = async () => {
2626
setIsVerifying(true);
27+
2728
try {
2829
const response = await fetch('https://api.github.com/user', {
2930
headers: {
@@ -33,16 +34,20 @@ export default function ConnectionsTab() {
3334

3435
if (response.ok) {
3536
const data = (await response.json()) as GitHubUserResponse;
37+
3638
if (data.login === githubUsername) {
3739
setIsConnected(true);
3840
return true;
3941
}
4042
}
43+
4144
setIsConnected(false);
45+
4246
return false;
4347
} catch (error) {
4448
console.error('Error verifying GitHub credentials:', error);
4549
setIsConnected(false);
50+
4651
return false;
4752
} finally {
4853
setIsVerifying(false);
@@ -56,6 +61,7 @@ export default function ConnectionsTab() {
5661
}
5762

5863
setIsVerifying(true);
64+
5965
const isValid = await verifyGitHubCredentials();
6066

6167
if (isValid) {

app/components/settings/features/FeaturesTab.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ export default function FeaturesTab() {
6565
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]"
6666
>
6767
{PromptLibrary.getList().map((x) => (
68-
<option value={x.id}>{x.label}</option>
68+
<option key={x.id} value={x.id}>
69+
{x.label}
70+
</option>
6971
))}
7072
</select>
7173
</div>

app/components/sidebar/HistoryItem.tsx

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as Dialog from '@radix-ui/react-dialog';
44
import { type ChatHistoryItem } from '~/lib/persistence';
55
import WithTooltip from '~/components/ui/Tooltip';
66
import { useEditChatDescription } from '~/lib/hooks';
7+
import { forwardRef, type ForwardedRef } from 'react';
78

89
interface HistoryItemProps {
910
item: ChatHistoryItem;
@@ -103,25 +104,31 @@ export function HistoryItem({ item, onDelete, onDuplicate, exportChat }: History
103104
);
104105
}
105106

106-
const ChatActionButton = ({
107-
toolTipContent,
108-
icon,
109-
className,
110-
onClick,
111-
}: {
112-
toolTipContent: string;
113-
icon: string;
114-
className?: string;
115-
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
116-
btnTitle?: string;
117-
}) => {
118-
return (
119-
<WithTooltip tooltip={toolTipContent}>
120-
<button
121-
type="button"
122-
className={`scale-110 mr-2 hover:text-bolt-elements-item-contentAccent ${icon} ${className ? className : ''}`}
123-
onClick={onClick}
124-
/>
125-
</WithTooltip>
126-
);
127-
};
107+
const ChatActionButton = forwardRef(
108+
(
109+
{
110+
toolTipContent,
111+
icon,
112+
className,
113+
onClick,
114+
}: {
115+
toolTipContent: string;
116+
icon: string;
117+
className?: string;
118+
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
119+
btnTitle?: string;
120+
},
121+
ref: ForwardedRef<HTMLButtonElement>,
122+
) => {
123+
return (
124+
<WithTooltip tooltip={toolTipContent}>
125+
<button
126+
ref={ref}
127+
type="button"
128+
className={`scale-110 mr-2 hover:text-bolt-elements-item-contentAccent ${icon} ${className ? className : ''}`}
129+
onClick={onClick}
130+
/>
131+
</WithTooltip>
132+
);
133+
},
134+
);

app/lib/runtime/action-runner.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ export class ActionRunner {
202202
}
203203

204204
const webcontainer = await this.#webcontainer;
205+
const relativePath = nodePath.relative(webcontainer.workdir, action.filePath);
205206

206-
let folder = nodePath.dirname(action.filePath);
207+
let folder = nodePath.dirname(relativePath);
207208

208209
// remove trailing slashes
209210
folder = folder.replace(/\/+$/g, '');
@@ -218,8 +219,8 @@ export class ActionRunner {
218219
}
219220

220221
try {
221-
await webcontainer.fs.writeFile(action.filePath, action.content);
222-
logger.debug(`File written ${action.filePath}`);
222+
await webcontainer.fs.writeFile(relativePath, action.content);
223+
logger.debug(`File written ${relativePath}`);
223224
} catch (error) {
224225
logger.error('Failed to write file\n\n', error);
225226
}

0 commit comments

Comments
 (0)