Skip to content

Commit b56d466

Browse files
committed
Enable AI assistant file attaching feature in every environment
1 parent 6255611 commit b56d466

File tree

5 files changed

+6
-21
lines changed

5 files changed

+6
-21
lines changed

.github/workflows/deploy-host.yml

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
echo "AWS_ROLE_ARN=arn:aws:iam::680542703984:role/boxel-host" >> $GITHUB_ENV
3636
echo "AWS_S3_BUCKET=cardstack-boxel-host-staging" >> $GITHUB_ENV
3737
echo "AWS_CLOUDFRONT_DISTRIBUTION=E35TXLK9HIMESQ" >> $GITHUB_ENV
38-
echo "AI_ASSISTANT_EXPERIMENTAL_ATTACHING_FILES_ENABLED=true" >> $GITHUB_ENV
3938
else
4039
echo "unrecognized environment"
4140
exit 1;

.github/workflows/pr-boxel-host.yml

-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ jobs:
6363
AWS_S3_BUCKET: boxel-host-preview.stack.cards
6464
AWS_REGION: us-east-1
6565
AWS_CLOUDFRONT_DISTRIBUTION: EU4RGLH4EOCHJ
66-
AI_ASSISTANT_EXPERIMENTAL_ATTACHING_FILES_ENABLED: true
6766
with:
6867
package: boxel-host
6968
environment: staging
@@ -93,7 +92,6 @@ jobs:
9392
AWS_S3_BUCKET: boxel-host-preview.boxel.ai
9493
AWS_REGION: us-east-1
9594
AWS_CLOUDFRONT_DISTRIBUTION: E2PZR9CIAW093B
96-
AI_ASSISTANT_EXPERIMENTAL_ATTACHING_FILES_ENABLED: true
9795
with:
9896
package: boxel-host
9997
environment: production

packages/host/app/components/ai-assistant/attachment-picker/index.gts

+2-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919

2020
import CardPill from '@cardstack/host/components/card-pill';
2121
import FilePill from '@cardstack/host/components/file-pill';
22-
import ENV from '@cardstack/host/config/environment';
2322

2423
import { type CardDef } from 'https://cardstack.com/base/card-api';
2524
import { type FileDef } from 'https://cardstack.com/base/file-api';
@@ -42,8 +41,6 @@ interface Signature {
4241
};
4342
}
4443

45-
const isAttachingFilesEnabled =
46-
ENV.featureFlags?.AI_ASSISTANT_EXPERIMENTAL_ATTACHING_FILES_ENABLED;
4744
const MAX_ITEMS_TO_DISPLAY = 4;
4845

4946
export default class AiAssistantAttachmentPicker extends Component<Signature> {
@@ -74,7 +71,7 @@ export default class AiAssistantAttachmentPicker extends Component<Signature> {
7471
@removeCard={{@removeCard}}
7572
/>
7673
{{/if}}
77-
{{else if isAttachingFilesEnabled}}
74+
{{else}}
7875
{{#if (this.isAutoAttachedFile item)}}
7976
<Tooltip @placement='top'>
8077
<:trigger>
@@ -112,7 +109,7 @@ export default class AiAssistantAttachmentPicker extends Component<Signature> {
112109
</Pill>
113110
{{/if}}
114111
{{#if this.canDisplayAddButton}}
115-
{{#if (and (eq @submode 'code') isAttachingFilesEnabled)}}
112+
{{#if (eq @submode 'code')}}
116113
<AddButton
117114
class={{cn 'attach-button' icon-only=this.files.length}}
118115
@variant='pill'

packages/host/app/config/environment.d.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,5 @@ declare const config: {
2828
sqlSchema: string;
2929
assetsURL: string;
3030
stripePaymentLink: string;
31-
featureFlags?: {
32-
AI_ASSISTANT_EXPERIMENTAL_ATTACHING_FILES_ENABLED: boolean;
33-
};
31+
featureFlags?: {};
3432
};

packages/host/config/environment.js

+3-10
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ module.exports = function (environment) {
4141
hostsOwnAssets: true,
4242
resolvedBaseRealmURL:
4343
process.env.RESOLVED_BASE_REALM_URL || 'http://localhost:4201/base/',
44-
featureFlags: {
45-
AI_ASSISTANT_EXPERIMENTAL_ATTACHING_FILES_ENABLED:
46-
process.env.AI_ASSISTANT_EXPERIMENTAL_ATTACHING_FILES_ENABLED || false,
47-
},
44+
featureFlags: {},
4845
};
4946

5047
if (environment === 'development') {
@@ -53,9 +50,7 @@ module.exports = function (environment) {
5350
// ENV.APP.LOG_TRANSITIONS = true;
5451
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
5552
// ENV.APP.LOG_VIEW_LOOKUPS = true;
56-
ENV.featureFlags = {
57-
AI_ASSISTANT_EXPERIMENTAL_ATTACHING_FILES_ENABLED: true,
58-
};
53+
ENV.featureFlags = {};
5954
}
6055

6156
if (environment === 'test') {
@@ -75,9 +70,7 @@ module.exports = function (environment) {
7570
ENV.loginMessageTimeoutMs = 0;
7671
ENV.minSaveTaskDurationMs = 0;
7772
ENV.sqlSchema = sqlSchema;
78-
ENV.featureFlags = {
79-
AI_ASSISTANT_EXPERIMENTAL_ATTACHING_FILES_ENABLED: true,
80-
};
73+
ENV.featureFlags = {};
8174
}
8275

8376
if (environment === 'production') {

0 commit comments

Comments
 (0)