-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36833 from appsmithorg/release
11/10 - Daily Promotion
- Loading branch information
Showing
48 changed files
with
906 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...widgets/src/components/AIChat/src/AssistantSuggestionButton/AssistantSuggestionButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Text } from "@appsmith/wds"; | ||
import { clsx } from "clsx"; | ||
import React from "react"; | ||
import { Button as HeadlessButton } from "react-aria-components"; | ||
import styles from "./styles.module.css"; | ||
import type { AssistantSuggestionButtonProps } from "./types"; | ||
|
||
export const AssistantSuggestionButton = ({ | ||
children, | ||
className, | ||
...rest | ||
}: AssistantSuggestionButtonProps) => { | ||
return ( | ||
<HeadlessButton className={clsx(styles.root, className)} {...rest}> | ||
<Text>{children}</Text> | ||
</HeadlessButton> | ||
); | ||
}; |
2 changes: 2 additions & 0 deletions
2
...ckages/design-system/widgets/src/components/AIChat/src/AssistantSuggestionButton/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./AssistantSuggestionButton"; | ||
export * from "./types"; |
20 changes: 20 additions & 0 deletions
20
...sign-system/widgets/src/components/AIChat/src/AssistantSuggestionButton/styles.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.root { | ||
height: 30px; | ||
padding: 0 var(--inner-spacing-4); | ||
background-color: var(--bg-neutral-subtle-alt, #e7e8e8); | ||
border-radius: var(--radius-inner-button, 1.8px); | ||
|
||
&:hover { | ||
background-color: var(--bg-neutral-subtle-alt-hover, #f0f1f1); | ||
} | ||
|
||
&:focus-visible { | ||
box-shadow: | ||
0 0 0 2px var(--color-bg), | ||
0 0 0 4px var(--color-bd-focus); | ||
} | ||
|
||
&:active { | ||
background-color: var(--bg-neutral-subtle-alt-active, #e1e2e2); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...ckages/design-system/widgets/src/components/AIChat/src/AssistantSuggestionButton/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type { PropsWithChildren } from "react"; | ||
import type { ButtonProps as HeadlessButtonProps } from "react-aria-components"; | ||
|
||
export interface AssistantSuggestionButtonProps | ||
extends PropsWithChildren<HeadlessButtonProps> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { | ||
BatchSpanProcessor, | ||
NodeTracerProvider, | ||
} from "@opentelemetry/sdk-trace-node"; | ||
import { Resource } from "@opentelemetry/resources"; | ||
import { | ||
ATTR_DEPLOYMENT_NAME, | ||
ATTR_SERVICE_INSTANCE_ID, | ||
} from "@opentelemetry/semantic-conventions/incubating"; | ||
import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions"; | ||
import { registerInstrumentations } from "@opentelemetry/instrumentation"; | ||
import { HttpInstrumentation } from "@opentelemetry/instrumentation-http"; | ||
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto"; | ||
|
||
const provider = new NodeTracerProvider({ | ||
resource: new Resource({ | ||
[ATTR_DEPLOYMENT_NAME]: `${process.env.APPSMITH_DEPLOYMENT_NAME || "self-hosted"}`, | ||
[ATTR_SERVICE_INSTANCE_ID]: `${process.env.HOSTNAME || "appsmith-0"}`, | ||
[ATTR_SERVICE_NAME]: "rts", | ||
}), | ||
}); | ||
|
||
const nrTracesExporter = new OTLPTraceExporter({ | ||
url: `${process.env.APPSMITH_NEW_RELIC_OTEL_EXPORTER_OTLP_ENDPOINT}/v1/traces`, | ||
headers: { | ||
"api-key": `${process.env.APPSMITH_NEW_RELIC_OTLP_LICENSE_KEY}`, | ||
}, | ||
}); | ||
|
||
registerInstrumentations({ | ||
instrumentations: [new HttpInstrumentation()], | ||
}); | ||
|
||
const batchSpanProcessor = new BatchSpanProcessor( | ||
nrTracesExporter, | ||
//Optional BatchSpanProcessor Configurations | ||
{ | ||
// The maximum queue size. After the size is reached spans are dropped. | ||
maxQueueSize: 100, | ||
// The maximum batch size of every export. It must be smaller or equal to maxQueueSize. | ||
maxExportBatchSize: 50, | ||
// The interval between two consecutive exports | ||
scheduledDelayMillis: 500, | ||
// How long the export can run before it is cancelled | ||
exportTimeoutMillis: 30000, | ||
}, | ||
); | ||
|
||
provider.addSpanProcessor(batchSpanProcessor); | ||
provider.register(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.